diff --git a/generation_config.yaml b/generation_config.yaml index c11dc476b7bd..3c20e3320577 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -2,3016 +2,3054 @@ gapic_generator_version: 2.70.0 googleapis_commitish: 62e4ecb2f4390728990514fea14aad0431881a52 libraries_bom_version: 26.79.0 libraries: -- api_shortname: accessapproval - name_pretty: Access Approval - product_documentation: https://cloud.google.com/access-approval/docs/ - api_description: enables controlling access to your organization's data by Google - personnel. - release_level: stable - GAPICs: - - proto_path: google/cloud/accessapproval/v1 -- api_shortname: accesscontextmanager - name_pretty: Identity Access Context Manager - product_documentation: n/a - api_description: n/a - release_level: stable - distribution_name: com.google.cloud:google-identity-accesscontextmanager - GAPICs: - - proto_path: google/identity/accesscontextmanager/v1 - - proto_path: google/identity/accesscontextmanager/type -- api_shortname: admanager - name_pretty: Google Ad Manager API - product_documentation: https://developers.google.com/ad-manager/api/beta - api_description: The Ad Manager API enables an app to integrate with Google Ad Manager. - You can read Ad Manager data and run reports using the API. - client_documentation: https://cloud.google.com/java/docs/reference/ad-manager/latest/overview - release_level: preview - distribution_name: com.google.api-ads:ad-manager - api_id: admanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.api-ads - cloud_api: false - GAPICs: - - proto_path: google/ads/admanager/v1 - requires_billing: true -- api_shortname: advisorynotifications - name_pretty: Advisory Notifications API - product_documentation: https://cloud.google.com/advisory-notifications/ - api_description: An API for accessing Advisory Notifications in Google Cloud. - release_level: stable - GAPICs: - - proto_path: google/cloud/advisorynotifications/v1 -- api_shortname: aiplatform - name_pretty: Vertex AI - product_documentation: https://cloud.google.com/vertex-ai/docs - api_description: is an integrated suite of machine learning tools and services for - building and using ML models with AutoML or custom code. It offers both novices - and experts the best workbench for the entire machine learning development lifecycle. - release_level: stable - rest_documentation: https://cloud.google.com/vertex-ai/docs/reference/rest - rpc_documentation: https://cloud.google.com/vertex-ai/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/aiplatform/v1 - - proto_path: google/cloud/aiplatform/v1beta1 -- api_shortname: alloydb - name_pretty: AlloyDB - product_documentation: https://cloud.google.com/alloydb/ - api_description: AlloyDB is a fully managed, PostgreSQL-compatible database service - with industry-leading performance, availability, and scale. - rest_documentation: https://cloud.google.com/alloydb/docs/reference/rest - release_level: stable - GAPICs: - - proto_path: google/cloud/alloydb/v1 - - proto_path: google/cloud/alloydb/v1alpha - - proto_path: google/cloud/alloydb/v1beta -- api_shortname: alloydb - name_pretty: AlloyDB connectors - product_documentation: https://cloud.google.com/alloydb/docs - api_description: AlloyDB is a fully-managed, PostgreSQL-compatible database for - demanding transactional workloads. It provides enterprise-grade performance and - availability while maintaining 100% compatibility with open-source PostgreSQL. - api_id: connectors.googleapis.com - library_name: alloydb-connectors - rest_documentation: https://cloud.google.com/alloydb/docs/reference/rest - release_level: stable - GAPICs: - - proto_path: google/cloud/alloydb/connectors/v1 - - proto_path: google/cloud/alloydb/connectors/v1alpha - - proto_path: google/cloud/alloydb/connectors/v1beta -- api_shortname: analyticsadmin - name_pretty: Analytics Admin - product_documentation: https://developers.google.com/analytics - api_description: allows you to manage Google Analytics accounts and properties. - library_name: analytics-admin - cloud_api: false - distribution_name: com.google.analytics:google-analytics-admin - codeowner_team: '@googleapis/analytics-dpe' - GAPICs: - - proto_path: google/analytics/admin/v1alpha - - proto_path: google/analytics/admin/v1beta -- api_shortname: analyticsdata - name_pretty: Analytics Data - product_documentation: https://developers.google.com/analytics/trusted-testing/analytics-data - api_description: provides programmatic methods to access report data in Google Analytics - App+Web properties. - library_name: analytics-data - api_id: analytics-data.googleapis.com - cloud_api: false - distribution_name: com.google.analytics:google-analytics-data - codeowner_team: '@googleapis/analytics-dpe' - GAPICs: - - proto_path: google/analytics/data/v1alpha - - proto_path: google/analytics/data/v1beta -- api_shortname: analyticshub - name_pretty: Analytics Hub API - product_documentation: https://cloud.google.com/bigquery/TBD - api_description: TBD - release_level: stable - GAPICs: - - proto_path: google/cloud/bigquery/analyticshub/v1 -- api_shortname: apigateway - name_pretty: API Gateway - product_documentation: https://cloud.google.com/api-gateway/docs - api_description: enables you to provide secure access to your backend services through - a well-defined REST API that is consistent across all of your services, regardless - of the service implementation. Clients consume your REST APIS to implement standalone - apps for a mobile device or tablet, through apps running in a browser, or through - any other type of app that can make a request to an HTTP endpoint. - library_name: api-gateway - release_level: stable - api_id: apigateway.googleapis.com - rest_documentation: https://cloud.google.com/api-gateway/docs/reference/rest - GAPICs: - - proto_path: google/cloud/apigateway/v1 -- api_shortname: apigeeconnect - name_pretty: Apigee Connect - product_documentation: https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/ - api_description: allows the Apigee hybrid management plane to connect securely to - the MART service in the runtime plane without requiring you to expose the MART - endpoint on the internet. - library_name: apigee-connect - release_level: stable - GAPICs: - - proto_path: google/cloud/apigeeconnect/v1 -- api_shortname: apigee-registry - name_pretty: Registry API - product_documentation: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api - api_description: allows teams to upload and share machine-readable descriptions - of APIs that are in use and in development. - api_id: apigeeregistry.googleapis.com - GAPICs: - - proto_path: google/cloud/apigeeregistry/v1 -- api_shortname: apihub - name_pretty: API hub API - product_documentation: https://cloud.google.com/apigee/docs/apihub/what-is-api-hub - api_description: API hub lets you consolidate and organize information about all - of the APIs of interest to your organization. API hub lets you capture critical - information about APIs that allows developers to discover and evaluate them - easily and leverage the work of other teams wherever possible. API platform - teams can use API hub to have visibility into and manage their portfolio of APIs. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-apihub/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-apihub - api_id: apihub.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/apihub/v1 - requires_billing: true -- api_shortname: apikeys - name_pretty: API Keys API - product_documentation: https://cloud.google.com/api-keys/ - api_description: API Keys lets you create and manage your API keys for your projects. - release_level: stable - GAPICs: - - proto_path: google/api/apikeys/v2 -- api_shortname: appengine - name_pretty: App Engine Admin API - product_documentation: https://cloud.google.com/appengine/docs/admin-api/ - api_description: you to manage your App Engine applications. - library_name: appengine-admin - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - GAPICs: - - proto_path: google/appengine/v1 -- api_shortname: apphub - name_pretty: App Hub API - product_documentation: https://cloud.google.com/app-hub/docs/overview - api_description: App Hub simplifies the process of building, running, and managing - applications on Google Cloud. - rpc_documentation: https://cloud.google.com/app-hub/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/apphub/v1 -- api_shortname: appoptimize - name_pretty: App Optimize API - product_documentation: https://docs.cloud.google.com/app-optimize/overview - api_description: The App Optimize API provides developers and platform teams with - tools to monitor, analyze, and improve the performance and cost-efficiency of - their cloud applications. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-appoptimize/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-appoptimize - api_id: appoptimize.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/appoptimize/v1beta - requires_billing: true -- api_shortname: area120tables - name_pretty: Area 120 Tables - product_documentation: https://area120.google.com/ - api_description: provides programmatic methods to the Area 120 Tables API. - library_name: area120-tables - cloud_api: false - distribution_name: com.google.area120:google-area120-tables - GAPICs: - - proto_path: google/area120/tables/v1alpha1 -- api_shortname: artifactregistry - name_pretty: Artifact Registry - product_documentation: https://cloud.google.com/artifact-registry - api_description: provides a single place for your organization to manage container - images and language packages (such as Maven and npm). It is fully integrated with - Google Cloud's tooling and runtimes and comes with support for native artifact - protocols. This makes it simple to integrate it with your CI/CD tooling to set - up automated pipelines. - library_name: artifact-registry - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/artifact-registry/docs/reference/rest - rpc_documentation: https://cloud.google.com/artifact-registry/docs/reference/rpc - GAPICs: - - proto_path: google/devtools/artifactregistry/v1 - - proto_path: google/devtools/artifactregistry/v1beta2 -- api_shortname: cloudasset - name_pretty: Cloud Asset Inventory - product_documentation: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview - api_description: provides inventory services based on a time series database. This - database keeps a five week history of Google Cloud asset metadata. The Cloud Asset - Inventory export service allows you to export all asset metadata at a certain - timestamp or export event change history during a timeframe. - library_name: asset - release_level: stable - api_reference: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview - issue_tracker: https://issuetracker.google.com/issues/new?component=187210&template=0 - GAPICs: - - proto_path: google/cloud/asset/v1 - - proto_path: google/cloud/asset/v1p1beta1 - - proto_path: google/cloud/asset/v1p2beta1 - - proto_path: google/cloud/asset/v1p5beta1 - - proto_path: google/cloud/asset/v1p7beta1 -- api_shortname: assuredworkloads - name_pretty: Assured Workloads for Government - product_documentation: https://cloud.google.com/assured-workloads/ - api_description: allows you to secure your government workloads and accelerate your - path to running compliant workloads on Google Cloud with Assured Workloads for - Government. - library_name: assured-workloads - release_level: stable - rest_documentation: https://cloud.google.com/assured-workloads/docs/reference/rest - GAPICs: - - proto_path: google/cloud/assuredworkloads/v1 - - proto_path: google/cloud/assuredworkloads/v1beta1 -- api_shortname: auditmanager - name_pretty: Audit Manager API - product_documentation: https://cloud.google.com/audit-manager/docs - api_description: Lists information about the supported locations for this service. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-auditmanager/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-auditmanager - api_id: auditmanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/auditmanager/v1 - requires_billing: true -- api_shortname: automl - name_pretty: Cloud Auto ML - product_documentation: https://cloud.google.com/automl/docs/ - api_description: makes the power of machine learning available to you even if you - have limited knowledge of machine learning. You can use AutoML to build on Google's - machine learning capabilities to create your own custom machine learning models - that are tailored to your business needs, and then integrate those models into - your applications and web sites. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559744 - rest_documentation: https://cloud.google.com/automl/docs/reference/rest - rpc_documentation: https://cloud.google.com/automl/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/automl/v1 - - proto_path: google/cloud/automl/v1beta1 -- api_shortname: backupdr - name_pretty: Backup and DR Service API - product_documentation: https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-dr - api_description: 'Backup and DR Service is a powerful, centralized, cloud-first - backup and disaster recovery solution for cloud-based and hybrid workloads. ' - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/overview - release_level: stable - distribution_name: com.google.cloud:google-cloud-backupdr - api_id: backupdr.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/backupdr/v1 - requires_billing: true -- api_shortname: baremetalsolution - name_pretty: Bare Metal Solution - product_documentation: https://cloud.google.com/bare-metal/docs - api_description: Bring your Oracle workloads to Google Cloud with Bare Metal Solution - and jumpstart your cloud journey with minimal risk. - library_name: bare-metal-solution - rest_documentation: https://cloud.google.com/bare-metal/docs/reference/rest - rpc_documentation: https://cloud.google.com/bare-metal/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/baremetalsolution/v2 -- api_shortname: batch - name_pretty: Cloud Batch - product_documentation: https://cloud.google.com/ - api_description: n/a - GAPICs: - - proto_path: google/cloud/batch/v1 - - proto_path: google/cloud/batch/v1alpha -- api_shortname: beyondcorp-appconnections - name_pretty: BeyondCorp AppConnections - product_documentation: https://cloud.google.com/beyondcorp-enterprise/ - api_description: is Google's implementation of the zero trust model. It builds upon - a decade of experience at Google, combined with ideas and best practices from - the community. By shifting access controls from the network perimeter to individual - users, BeyondCorp enables secure work from virtually any location without the - need for a traditional VPN. - GAPICs: - - proto_path: google/cloud/beyondcorp/appconnections/v1 -- api_shortname: beyondcorp-appconnectors - name_pretty: BeyondCorp AppConnectors - product_documentation: cloud.google.com/beyondcorp-enterprise/ - api_description: provides methods to manage (create/read/update/delete) BeyondCorp - AppConnectors. - GAPICs: - - proto_path: google/cloud/beyondcorp/appconnectors/v1 -- api_shortname: beyondcorp-appgateways - name_pretty: BeyondCorp AppGateways - product_documentation: https://cloud.google.com/beyondcorp-enterprise/ - api_description: A zero trust solution that enables secure access to applications - and resources, and offers integrated threat and data protection. - api_id: beyondcorp.googleapis.com - GAPICs: - - proto_path: google/cloud/beyondcorp/appgateways/v1 -- api_shortname: beyondcorp-clientconnectorservices - name_pretty: BeyondCorp ClientConnectorServices - product_documentation: https://cloud.google.com/beyondcorp-enterprise/ - api_description: A zero trust solution that enables secure access to applications - and resources, and offers integrated threat and data protection. - api_id: beyondcorp.googleapis.com - GAPICs: - - proto_path: google/cloud/beyondcorp/clientconnectorservices/v1 -- api_shortname: beyondcorp-clientgateways - name_pretty: BeyondCorp ClientGateways - product_documentation: https://cloud.google.com/beyondcorp-enterprise/ - api_description: A zero trust solution that enables secure access to applications - and resources, and offers integrated threat and data protection. - api_id: beyondcorp.googleapis.com - GAPICs: - - proto_path: google/cloud/beyondcorp/clientgateways/v1 -- api_shortname: biglake - name_pretty: BigLake - product_documentation: https://cloud.google.com/biglake - api_description: The BigLake API provides access to BigLake Metastore, a serverless, - fully managed, and highly available metastore for open-source data that can be - used for querying Apache Iceberg tables in BigQuery. - GAPICs: - - proto_path: google/cloud/bigquery/biglake/v1 - - proto_path: google/cloud/biglake/v1 - - proto_path: google/cloud/bigquery/biglake/v1alpha1 - - proto_path: google/cloud/biglake/hive/v1beta -- api_shortname: analyticshub - name_pretty: Analytics Hub - product_documentation: https://cloud.google.com/analytics-hub - api_description: is a data exchange that allows you to efficiently and securely - exchange data assets across organizations to address challenges of data reliability - and cost. - library_name: bigquery-data-exchange - GAPICs: - - proto_path: google/cloud/bigquery/dataexchange/v1beta1 -- api_shortname: bigqueryconnection - name_pretty: Cloud BigQuery Connection - product_documentation: https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest - api_description: allows users to manage BigQuery connections to external data sources. - release_level: stable - client_documentation: - https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1beta1 - GAPICs: - - proto_path: google/cloud/bigquery/connection/v1 - - proto_path: google/cloud/bigquery/connection/v1beta1 -- api_shortname: bigquerydatapolicy - name_pretty: BigQuery DataPolicy API - product_documentation: https://cloud.google.com/bigquery/docs/reference/datapolicy/ - api_description: '' - GAPICs: - - proto_path: google/cloud/bigquery/datapolicies/v1 - - proto_path: google/cloud/bigquery/datapolicies/v1beta1 - - proto_path: google/cloud/bigquery/datapolicies/v2beta1 - - proto_path: google/cloud/bigquery/datapolicies/v2 -- api_shortname: bigquerydatatransfer - name_pretty: BigQuery Data Transfer Service - product_documentation: https://cloud.google.com/bigquery/transfer/ - api_description: transfers data from partner SaaS applications to Google BigQuery - on a scheduled, managed basis. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559654 - GAPICs: - - proto_path: google/cloud/bigquery/datatransfer/v1 -- api_shortname: bigquerymigration - name_pretty: BigQuery Migration - product_documentation: https://cloud.google.com/bigquery/docs - api_description: BigQuery Migration API - rest_documentation: https://cloud.google.com/bigquery/docs/reference/rest - GAPICs: - - proto_path: google/cloud/bigquery/migration/v2 - - proto_path: google/cloud/bigquery/migration/v2alpha -- api_shortname: bigqueryreservation - name_pretty: Cloud BigQuery Reservation - product_documentation: https://cloud.google.com/bigquery/docs/reference/reservations/rpc - api_description: allows users to manage their flat-rate BigQuery reservations. - release_level: stable - GAPICs: - - proto_path: google/cloud/bigquery/reservation/v1 -- api_shortname: bigquerystorage - name_pretty: BigQuery Storage - product_documentation: https://cloud.google.com/bigquery/docs/reference/storage/ - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/history - api_description: is an API for reading data stored in BigQuery. This API provides - direct, high-throughput read access to existing BigQuery tables, supports parallel - access with automatic liquid sharding, and allows fine-grained control over what - data is returned. - issue_tracker: https://issuetracker.google.com/savedsearches/559654 - release_level: stable - language: java - distribution_name: com.google.cloud:google-cloud-bigquerystorage - codeowner_team: '@googleapis/bigquery-team' - api_id: bigquerystorage.googleapis.com - transport: grpc - requires_billing: true - library_type: GAPIC_COMBO - recommended_package: com.google.cloud.bigquery.storage.v1 - GAPICs: - - proto_path: google/cloud/bigquery/storage/v1 - - proto_path: google/cloud/bigquery/storage/v1alpha - - proto_path: google/cloud/bigquery/storage/v1beta1 - - proto_path: google/cloud/bigquery/storage/v1beta2 - - proto_path: google/cloud/bigquery/storage/v1beta -- api_shortname: cloudbilling - name_pretty: Cloud Billing - product_documentation: https://cloud.google.com/billing/docs - api_description: allows developers to manage their billing accounts or browse the - catalog of SKUs and pricing. - library_name: billing - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559770 - rest_documentation: https://cloud.google.com/billing/docs/reference/rest - rpc_documentation: https://cloud.google.com/billing/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/billing/v1 -- api_shortname: billingbudgets - name_pretty: Cloud Billing Budgets - product_documentation: https://cloud.google.com/billing/docs/how-to/budgets - api_description: allows you to avoid surprises on your bill by creating budgets - to monitor all your Google Cloud charges in one place. - release_level: stable - GAPICs: - - proto_path: google/cloud/billing/budgets/v1 - - proto_path: google/cloud/billing/budgets/v1beta1 -- api_shortname: binaryauthorization - name_pretty: Binary Authorization - product_documentation: https://cloud.google.com/binary-authorization/docs - api_description: ' is a service on Google Cloud that provides centralized software - supply-chain security for applications that run on Google Kubernetes Engine (GKE) - and Anthos clusters on VMware' - library_name: binary-authorization - release_level: stable - api_id: binaryauthorization.googleapis.com - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/binary-authorization/docs/reference/rest - rpc_documentation: https://cloud.google.com/binary-authorization/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/binaryauthorization/v1 - - proto_path: google/cloud/binaryauthorization/v1beta1 -- api_shortname: capacityplanner - name_pretty: Capacity Planner API - product_documentation: https://cloud.google.com/capacity-planner/docs - api_description: Provides programmatic access to Capacity Planner features. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-capacityplanner/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-capacityplanner - api_id: capacityplanner.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/capacityplanner/v1beta - requires_billing: true -- api_shortname: certificatemanager - name_pretty: Certificate Manager - product_documentation: https://cloud.google.com/certificate-manager/docs - api_description: lets you acquire and manage TLS (SSL) certificates for use with - Cloud Load Balancing. - library_name: certificate-manager - api_id: certificatemanager.googleapis.com - GAPICs: - - proto_path: google/cloud/certificatemanager/v1 -- api_shortname: ces - name_pretty: Gemini Enterprise for Customer Experience API - product_documentation: https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps - api_description: Customer Experience Agent Studio (CX Agent Studio) is a minimal - code conversational agent builder. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-ces/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-ces - api_id: ces.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/ces/v1 - - proto_path: google/cloud/ces/v1beta - requires_billing: true - rpc_documentation: - https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/rpc -- api_shortname: cloudchannel - name_pretty: Channel Services - product_documentation: https://cloud.google.com/channel/docs - api_description: With Channel Services, Google Cloud partners and resellers have - a single unified resale platform, with a unified resale catalog, customer management, - order management, billing management, policy and authorization management, and - cost management. - library_name: channel - release_level: stable - rest_documentation: https://cloud.google.com/channel/docs/reference/rest - rpc_documentation: https://cloud.google.com/channel/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/channel/v1 -- api_shortname: chat - name_pretty: Google Chat API - product_documentation: https://developers.google.com/chat/concepts - api_description: The Google Chat API lets you build Chat apps to integrate your - services with Google Chat and manage Chat resources such as spaces, members, and - messages. - rest_documentation: https://developers.google.com/chat/api/reference/rest - GAPICs: - - proto_path: google/chat/v1 -- api_shortname: chronicle - name_pretty: Chronicle API - product_documentation: https://cloud.google.com/chronicle/docs/secops/secops-overview - api_description: The Google Cloud Security Operations API, popularly known as the - Chronicle API, serves endpoints that enable security analysts to analyze and mitigate - a security threat throughout its lifecycle - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-chronicle/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-chronicle - api_id: chronicle.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/chronicle/v1 - requires_billing: true -- api_shortname: cloudapiregistry - name_pretty: Cloud API Registry API - product_documentation: https://docs.cloud.google.com/api-registry/docs/overview - api_description: Cloud API Registry lets you discover, govern, use, and monitor - Model Context Protocol (MCP) servers and tools provided by Google, or by your - organization through Apigee API hub. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-cloudapiregistry/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-cloudapiregistry - api_id: cloudapiregistry.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/apiregistry/v1beta - - proto_path: google/cloud/apiregistry/v1 - requires_billing: true -- api_shortname: cloudbuild - name_pretty: Cloud Build - product_documentation: https://cloud.google.com/cloud-build/ - api_description: lets you build software quickly across all languages. Get complete - control over defining custom workflows for building, testing, and deploying across - multiple environments such as VMs, serverless, Kubernetes, or Firebase. - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - distribution_name: com.google.cloud:google-cloud-build - issue_tracker: https://issuetracker.google.com/savedsearches/5226584 - GAPICs: - - proto_path: google/devtools/cloudbuild/v1 - - proto_path: google/devtools/cloudbuild/v2 -- api_shortname: cloudcommerceconsumerprocurement - name_pretty: Cloud Commerce Consumer Procurement - product_documentation: https://cloud.google.com/marketplace/ - api_description: Find top solutions integrated with Google Cloud to accelerate your - digital transformation. Scale and simplify procurement for your organization with - online discovery, flexible purchasing, and fulfillment of enterprise-grade cloud - solutions. - GAPICs: - - proto_path: google/cloud/commerce/consumer/procurement/v1 - - proto_path: google/cloud/commerce/consumer/procurement/v1alpha1 -- api_shortname: cloudcontrolspartner - name_pretty: Cloud Controls Partner API - product_documentation: https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners - api_description: Provides insights about your customers and their Assured Workloads - based on your Sovereign Controls by Partners offering. - release_level: stable - GAPICs: - - proto_path: google/cloud/cloudcontrolspartner/v1 - - proto_path: google/cloud/cloudcontrolspartner/v1beta -- api_shortname: cloudquotas - name_pretty: Cloud Quotas API - product_documentation: https://cloud.google.com/cloudquotas/docs/ - api_description: "Cloud Quotas API provides GCP service consumers with management - and\n observability for resource usage, quotas, and restrictions of the services\n\ - \ they consume." - release_level: stable - GAPICs: - - proto_path: google/api/cloudquotas/v1 - - proto_path: google/api/cloudquotas/v1beta -- api_shortname: cloudsecuritycompliance - name_pretty: Cloud Security Compliance API - product_documentation: - https://cloud.google.com/security-command-center/docs/compliance-manager-overview - api_description: Compliance Manager uses software-defined controls that let you - assess support for multiple compliance programs and security requirements within - a Google Cloud organization - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-cloudsecuritycompliance/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-cloudsecuritycompliance - api_id: cloudsecuritycompliance.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/cloudsecuritycompliance/v1 - requires_billing: true -- api_shortname: cloudsupport - name_pretty: Google Cloud Support API - product_documentation: https://cloud.google.com/support/docs/reference/support-api/ - api_description: Manages Google Cloud technical support cases for Customer Care - support offerings. - GAPICs: - - proto_path: google/cloud/support/v2 - - proto_path: google/cloud/support/v2beta -- api_shortname: compute - name_pretty: Compute Engine - product_documentation: https://cloud.google.com/compute/ - api_description: "delivers virtual machines running in Google's innovative data - centers and worldwide fiber network. Compute Engine's tooling and workflow support - enable scaling from single instances to global, load-balanced cloud computing. - Compute Engine's VMs boot quickly, come with persistent disk storage, deliver - consistent performance and are available in many configurations. " - release_level: stable - excluded_poms: grpc-google-cloud-compute-v1 - excluded_dependencies: grpc-google-cloud-compute-v1 - GAPICs: - - proto_path: google/cloud/compute/v1 -- api_shortname: confidentialcomputing - name_pretty: Confidential Computing API - product_documentation: https://cloud.google.com/confidential-computing/ - api_description: Protect data in-use with Confidential VMs, Confidential GKE, Confidential - Dataproc, and Confidential Space. - GAPICs: - - proto_path: google/cloud/confidentialcomputing/v1 - - proto_path: google/cloud/confidentialcomputing/v1alpha1 -- api_shortname: configdelivery - name_pretty: Config Delivery API - product_documentation: - https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages - api_description: ConfigDelivery service manages the deployment of kubernetes configuration - to a fleet of kubernetes clusters. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-configdelivery/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-configdelivery - api_id: configdelivery.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - requires_billing: true - rest_documentation: - https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/rest - GAPICs: - - proto_path: google/cloud/configdelivery/v1beta - - proto_path: google/cloud/configdelivery/v1 -- api_shortname: connectgateway - name_pretty: Connect Gateway API - product_documentation: - https://cloud.google.com/kubernetes-engine/enterprise/multicluster-management/gateway - api_description: The Connect Gateway service allows connectivity from external parties - to connected Kubernetes clusters. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-connectgateway/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-connectgateway - api_id: connectgateway.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/gkeconnect/gateway/v1 - requires_billing: true -- api_shortname: contactcenterinsights - name_pretty: CCAI Insights - product_documentation: https://cloud.google.com/dialogflow/priv/docs/insights/ - api_description: ' helps users detect and visualize patterns in their contact center - data.' - library_name: contact-center-insights - release_level: stable - codeowner_team: '@googleapis/api-contact-center-insights' - GAPICs: - - proto_path: google/cloud/contactcenterinsights/v1 -- api_shortname: container - name_pretty: Kubernetes Engine - product_documentation: https://cloud.google.com/kubernetes-engine/ - api_description: is an enterprise-grade platform for containerized applications, - including stateful and stateless, AI and ML, Linux and Windows, complex and simple - web apps, API, and backend services. Leverage industry-first features like four-way - auto-scaling and no-stress management. Optimize GPU and TPU provisioning, use - integrated developer tools, and get multi-cluster support from SREs. - release_level: stable - codeowner_team: '@googleapis/cloud-sdk-java-team' - issue_tracker: https://issuetracker.google.com/savedsearches/559777 - rest_documentation: https://cloud.google.com/kubernetes-engine/docs/reference/rest - GAPICs: - - proto_path: google/container/v1 - - proto_path: google/container/v1beta1 -- api_shortname: containeranalysis - name_pretty: Cloud Container Analysis - product_documentation: https://cloud.google.com/container-registry/docs/container-analysis - api_description: is a service that provides vulnerability scanning and metadata - storage for software artifacts. The service performs vulnerability scans on built - software artifacts, such as the images in Container Registry, then stores the - resulting metadata and makes it available for consumption through an API. The - metadata may come from several sources, including vulnerability scanning, other - Cloud services, and third-party providers. - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - issue_tracker: https://issuetracker.google.com/savedsearches/559777 - GAPICs: - - proto_path: google/devtools/containeranalysis/v1 - - proto_path: google/devtools/containeranalysis/v1beta1 -- api_shortname: contentwarehouse - name_pretty: Document AI Warehouse - product_documentation: https://cloud.google.com/document-warehouse/docs/overview - api_description: Document AI Warehouse is an integrated cloud-native GCP platform - to store, search, organize, govern and analyze documents and their structured - metadata. - GAPICs: - - proto_path: google/cloud/contentwarehouse/v1 -- api_shortname: datafusion - name_pretty: Cloud Data Fusion - product_documentation: https://cloud.google.com/data-fusion/docs - api_description: is a fully managed, cloud-native, enterprise data integration service - for quickly building and managing data pipelines. - library_name: data-fusion - release_level: stable - rest_documentation: https://cloud.google.com/data-fusion/docs/reference/rest - GAPICs: - - proto_path: google/cloud/datafusion/v1 - - proto_path: google/cloud/datafusion/v1beta1 -- api_shortname: databasecenter - name_pretty: Database Center API - product_documentation: https://cloud.google.com/database-center/docs/overview - api_description: Database Center provides an organization-wide, cross-product fleet - health platform to eliminate the overhead, complexity, and risk associated with - aggregating and summarizing health signals through custom dashboards. Through - Database Center’s fleet health dashboard and API, database platform teams that - are responsible for reliability, compliance, security, cost, and administration - of database fleets will now have a single pane of glass that pinpoints issues - relevant to each team. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-databasecenter - api_id: databasecenter.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/databasecenter/v1beta - requires_billing: true -- api_shortname: datacatalog - name_pretty: Data Catalog - product_documentation: https://cloud.google.com/data-catalog - api_description: is a fully managed and highly scalable data discovery and metadata - management service. - release_level: stable - issue_tracker: '' - GAPICs: - - proto_path: google/cloud/datacatalog/v1 - - proto_path: google/cloud/datacatalog/v1beta1 -- api_shortname: dataflow - name_pretty: Dataflow - product_documentation: https://cloud.google.com/dataflow/docs - api_description: is a managed service for executing a wide variety of data processing - patterns. - rest_documentation: https://cloud.google.com/dataflow/docs/reference/rest - rpc_documentation: https://cloud.google.com/dataflow/docs/reference/rpc - GAPICs: - - proto_path: google/dataflow/v1beta3 -- api_shortname: dataform - name_pretty: Cloud Dataform - product_documentation: https://cloud.google.com/dataform/docs - api_description: Help analytics teams manage data inside BigQuery using SQL. - GAPICs: - - proto_path: google/cloud/dataform/v1beta1 - - proto_path: google/cloud/dataform/v1 -- api_shortname: datalabeling - name_pretty: Data Labeling - product_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/ - api_description: is a service that lets you work with human labelers to generate - highly accurate labels for a collection of data that you can use to train your - machine learning models. - issue_tracker: '' - rest_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/reference/rest - rpc_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/datalabeling/v1beta1 -- api_shortname: datalineage - name_pretty: Data Lineage - product_documentation: https://cloud.google.com/dataplex/docs/about-data-lineage - api_description: Lineage is used to track data flows between assets over time. - release_level: stable - GAPICs: - - proto_path: google/cloud/datacatalog/lineage/v1 - - proto_path: google/cloud/datacatalog/lineage/configmanagement/v1 -- api_shortname: datamanager - name_pretty: Data Manager API - product_documentation: https://developers.google.com/data-manager - api_description: A unified ingestion API for data partners, agencies and advertisers - to connect first-party data across Google advertising products. - client_documentation: https://cloud.google.com/java/docs/reference/data-manager/latest/overview - release_level: preview - distribution_name: com.google.api-ads:data-manager - api_id: datamanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.api-ads - cloud_api: false - GAPICs: - - proto_path: google/ads/datamanager/v1 - library_name: datamanager - requires_billing: true - rpc_documentation: https://developers.google.com/data-manager/api/reference/rpc -- api_shortname: dataplex - name_pretty: Cloud Dataplex - product_documentation: https://cloud.google.com/dataplex - api_description: provides intelligent data fabric that enables organizations to - centrally manage, monitor, and govern their data across data lakes, data warehouses, - and data marts with consistent controls, providing access to trusted data and - powering analytics at scale. - release_level: stable - rest_documentation: https://cloud.google.com/dataplex/docs/reference/rest - rpc_documentation: https://cloud.google.com/dataplex/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/dataplex/v1 -- api_shortname: dataproc - name_pretty: Dataproc - product_documentation: https://cloud.google.com/dataproc - api_description: is a faster, easier, more cost-effective way to run Apache Spark - and Apache Hadoop. - release_level: stable - codeowner_team: '@googleapis/api-dataproc' - issue_tracker: https://issuetracker.google.com/savedsearches/559745 - rest_documentation: https://cloud.google.com/dataproc/docs/reference/rest - rpc_documentation: https://cloud.google.com/dataproc/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/dataproc/v1 -- api_shortname: metastore - name_pretty: Dataproc Metastore - product_documentation: https://cloud.google.com/dataproc-metastore/docs - api_description: is a fully managed, highly available, autoscaled, autohealing, - OSS-native metastore service that greatly simplifies technical metadata management. - Dataproc Metastore service is based on Apache Hive metastore and serves as a critical - component towards enterprise data lakes. - library_name: dataproc-metastore - release_level: stable - rest_documentation: https://cloud.google.com/dataproc-metastore/docs/reference/rest - rpc_documentation: https://cloud.google.com/dataproc-metastore/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/metastore/v1 - - proto_path: google/cloud/metastore/v1alpha - - proto_path: google/cloud/metastore/v1beta -- api_shortname: datastore - name_pretty: Cloud Datastore - product_documentation: https://cloud.google.com/datastore - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-datastore/latest/history - issue_tracker: https://issuetracker.google.com/savedsearches/559768 - release_level: stable - language: java - distribution_name: com.google.cloud:google-cloud-datastore - api_id: datastore.googleapis.com - library_type: GAPIC_COMBO - api_description: is a fully managed, schemaless database for\nstoring non-relational - data. Cloud Datastore automatically scales with\nyour users and supports ACID - transactions, high availability of reads and\nwrites, strong consistency for reads - and ancestor queries, and eventual\nconsistency for all other queries. - excluded_dependencies: grpc-google-cloud-datastore-v1 - extra_versioned_modules: datastore-v1-proto-client - excluded_poms: grpc-google-cloud-datastore-v1 - recommended_package: com.google.cloud.datastore - GAPICs: - - proto_path: google/datastore/v1 - - proto_path: google/datastore/admin/v1 -- api_shortname: datastream - name_pretty: Datastream - product_documentation: https://cloud.google.com/datastream/docs - api_description: is a serverless and easy-to-use change data capture (CDC) and replication - service. It allows you to synchronize data across heterogeneous databases and - applications reliably, and with minimal latency and downtime. - release_level: stable - rest_documentation: https://cloud.google.com/datastream/docs/reference/rest - GAPICs: - - proto_path: google/cloud/datastream/v1 - - proto_path: google/cloud/datastream/v1alpha1 -- api_shortname: clouddeploy - name_pretty: Google Cloud Deploy - product_documentation: https://cloud.google.com/deploy/docs - api_description: is a service that automates delivery of your applications to a - series of target environments in a defined sequence - library_name: deploy - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - GAPICs: - - proto_path: google/cloud/deploy/v1 -- api_shortname: developerconnect - name_pretty: Developer Connect API - product_documentation: https://cloud.google.com/developer-connect/docs/overview - api_description: Connect third-party source code management to Google - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-developerconnect/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-developerconnect - api_id: developerconnect.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/developerconnect/v1 - requires_billing: true -- api_shortname: devicestreaming - name_pretty: Device Streaming API - product_documentation: https://cloud.google.com/device-streaming/docs - api_description: The Cloud API for device streaming usage. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-devicestreaming/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-devicestreaming - api_id: devicestreaming.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/devicestreaming/v1 - requires_billing: true -- api_shortname: dialogflow - name_pretty: Dialogflow API - product_documentation: https://cloud.google.com/dialogflow-enterprise/ - api_description: is an end-to-end, build-once deploy-everywhere development suite - for creating conversational interfaces for websites, mobile applications, popular - messaging platforms, and IoT devices. You can use it to build interfaces (such - as chatbots and conversational IVR) that enable natural and rich interactions - between your users and your business. Dialogflow Enterprise Edition users have - access to Google Cloud Support and a service level agreement (SLA) for production - deployments. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/5300385 - GAPICs: - - proto_path: google/cloud/dialogflow/v2 - - proto_path: google/cloud/dialogflow/v2beta1 -- api_shortname: dialogflow-cx - name_pretty: Dialogflow CX - product_documentation: https://cloud.google.com/dialogflow/cx/docs - api_description: provides a new way of designing agents, taking a state machine - approach to agent design. This gives you clear and explicit control over a conversation, - a better end-user experience, and a better development workflow. - rest_documentation: https://cloud.google.com/dialogflow/cx/docs/reference/rest - rpc_documentation: https://cloud.google.com/dialogflow/cx/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/dialogflow/cx/v3 - - proto_path: google/cloud/dialogflow/cx/v3beta1 -- api_shortname: discoveryengine - name_pretty: Discovery Engine API - product_documentation: https://cloud.google.com/discovery-engine/media/docs - api_description: A Cloud API that offers search and recommendation discoverability - for documents from different industry verticals (e.g. media, retail, etc.). - release_level: stable - GAPICs: - - proto_path: google/cloud/discoveryengine/v1 - - proto_path: google/cloud/discoveryengine/v1alpha - - proto_path: google/cloud/discoveryengine/v1beta -- api_shortname: distributedcloudedge - name_pretty: Google Distributed Cloud Edge - product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/ - api_description: Google Distributed Cloud Edge allows you to run Kubernetes clusters - on dedicated hardware provided and maintained by Google that is separate from - the Google Cloud data center. - api_id: edgecontainer.googleapis.com - library_name: distributedcloudedge - release_level: stable - GAPICs: - - proto_path: google/cloud/edgecontainer/v1 -- api_shortname: dlp - name_pretty: Cloud Data Loss Prevention - product_documentation: https://cloud.google.com/dlp/docs/ - api_description: provides programmatic access to a powerful detection engine for - personally identifiable information and other privacy-sensitive data in unstructured - data streams, like text blocks and images. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/5548083 - rest_documentation: https://cloud.google.com/dlp/docs/reference/rest - rpc_documentation: https://cloud.google.com/dlp/docs/reference/rpc - GAPICs: - - proto_path: google/privacy/dlp/v2 -- api_shortname: datamigration - name_pretty: Database Migration Service - product_documentation: https://cloud.google.com/database-migration/docs - api_description: makes it easier for you to migrate your data to Google Cloud. This - service helps you lift and shift your MySQL and PostgreSQL workloads into Cloud - SQL. - library_name: dms - release_level: stable - api_id: datamigration.googleapis.com - rest_documentation: https://cloud.google.com/database-migration/docs/reference/rest - GAPICs: - - proto_path: google/cloud/clouddms/v1 -- api_shortname: documentai - name_pretty: Document AI - product_documentation: https://cloud.google.com/compute/docs/documentai/ - api_description: allows developers to unlock insights from your documents with machine - learning. - library_name: document-ai - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559755 - GAPICs: - - proto_path: google/cloud/documentai/v1 - - proto_path: google/cloud/documentai/v1beta3 -- api_shortname: domains - name_pretty: Cloud Domains - product_documentation: https://cloud.google.com/domains - api_description: allows you to register and manage domains by using Cloud Domains. - release_level: stable - GAPICs: - - proto_path: google/cloud/domains/v1 - - proto_path: google/cloud/domains/v1alpha2 - - proto_path: google/cloud/domains/v1beta1 -- api_shortname: edgenetwork - name_pretty: Distributed Cloud Edge Network API - product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs/overview - api_description: Network management API for Distributed Cloud Edge. - release_level: stable - GAPICs: - - proto_path: google/cloud/edgenetwork/v1 -- api_shortname: enterpriseknowledgegraph - name_pretty: Enterprise Knowledge Graph - product_documentation: https://cloud.google.com/enterprise-knowledge-graph/docs/overview - api_description: Enterprise Knowledge Graph organizes siloed information into organizational - knowledge, which involves consolidating, standardizing, and reconciling data in - an efficient and useful way. - GAPICs: - - proto_path: google/cloud/enterpriseknowledgegraph/v1 -- api_shortname: clouderrorreporting - name_pretty: Error Reporting - product_documentation: https://cloud.google.com/error-reporting - api_description: 'counts, analyzes, and aggregates the crashes in your running cloud - services. A centralized error management interface displays the results with sorting - and filtering capabilities. A dedicated view shows the error details: time chart, - occurrences, affected user count, first- and last-seen dates and a cleaned exception - stack trace. Opt in to receive email and mobile alerts on new errors.' - library_name: errorreporting - issue_tracker: https://issuetracker.google.com/savedsearches/559780 - requires_billing: false - GAPICs: - - proto_path: google/devtools/clouderrorreporting/v1beta1 -- api_shortname: essentialcontacts - name_pretty: Essential Contacts API - product_documentation: https://cloud.google.com/resource-manager/docs/managing-notification-contacts/ - api_description: helps you customize who receives notifications by providing your - own list of contacts in many Google Cloud services. - library_name: essential-contacts - release_level: stable - GAPICs: - - proto_path: google/cloud/essentialcontacts/v1 -- api_shortname: eventarc - name_pretty: Eventarc - product_documentation: https://cloud.google.com/eventarc/docs - api_description: lets you asynchronously deliver events from Google services, SaaS, - and your own apps using loosely coupled services that react to state changes. - Eventarc requires no infrastructure management, you can optimize productivity - and costs while building a modern, event-driven solution. - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/eventarc/docs/reference/rest - rpc_documentation: https://cloud.google.com/eventarc/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/eventarc/v1 -- api_shortname: eventarcpublishing - name_pretty: Eventarc Publishing - product_documentation: https://cloud.google.com/eventarc/docs - api_description: lets you asynchronously deliver events from Google services, SaaS, - and your own apps using loosely coupled services that react to state changes. - library_name: eventarc-publishing - api_id: eventarc-publishing.googleapis.com - rest_documentation: https://cloud.google.com/eventarc/docs/reference/rest - rpc_documentation: https://cloud.google.com/eventarc/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/eventarc/publishing/v1 -- api_shortname: file - name_pretty: Cloud Filestore API - product_documentation: https://cloud.google.com/filestore/docs - api_description: instances are fully managed NFS file servers on Google Cloud for - use with applications running on Compute Engine virtual machines (VMs) instances - or Google Kubernetes Engine clusters. - library_name: filestore - release_level: stable - rest_documentation: https://cloud.google.com/filestore/docs/reference/rest - GAPICs: - - proto_path: google/cloud/filestore/v1 - - proto_path: google/cloud/filestore/v1beta1 -- api_shortname: financialservices - name_pretty: Financial Services API - product_documentation: - https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview - api_description: Google Cloud's Anti Money Laundering AI (AML AI) product is an - API that scores AML risk. Use it to identify more risk, more defensibly, with - fewer false positives and reduced time per review. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-financialservices/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-financialservices - api_id: financialservices.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/financialservices/v1 - requires_billing: true -- api_shortname: cloudfunctions - name_pretty: Cloud Functions - product_documentation: https://cloud.google.com/functions - api_description: is a scalable pay as you go Functions-as-a-Service (FaaS) to run - your code with zero server management. - library_name: functions - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/functions/docs/reference/rest - rpc_documentation: https://cloud.google.com/functions/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/functions/v1 - - proto_path: google/cloud/functions/v2 - - proto_path: google/cloud/functions/v2alpha - - proto_path: google/cloud/functions/v2beta -- api_shortname: gdchardwaremanagement - name_pretty: GDC Hardware Management API - product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs - api_description: Google Distributed Cloud connected allows you to run Kubernetes - clusters on dedicated hardware provided and maintained by Google that is separate - from the Google Cloud data center. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-gdchardwaremanagement - api_id: gdchardwaremanagement.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/gdchardwaremanagement/v1alpha - requires_billing: true - rpc_documentation: - https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc -- api_shortname: geminidataanalytics - name_pretty: Data Analytics API with Gemini - product_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/overview - api_description: Use Conversational Analytics API to build an artificial intelligence - (AI)-powered chat interface, or data agent, that answers questions about structured - data using natural language. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-geminidataanalytics - api_id: geminidataanalytics.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/geminidataanalytics/v1beta - requires_billing: true - rpc_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/reference -- api_shortname: gke-backup - name_pretty: Backup for GKE - product_documentation: 'https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/concepts/backup-for-gke ' - api_description: is a service for backing up and restoring workloads in GKE. - api_id: gkebackup.googleapis.com - library_name: gke-backup - GAPICs: - - proto_path: google/cloud/gkebackup/v1 -- api_shortname: connectgateway - name_pretty: Connect Gateway API - product_documentation: https://cloud.google.com/anthos/multicluster-management/gateway/ - api_description: builds on the power of fleets to let Anthos users connect to and - run commands against registered Anthos clusters in a simple, consistent, and secured - way, whether the clusters are on Google Cloud, other public clouds, or on premises, - and makes it easier to automate DevOps processes across all your clusters. - library_name: gke-connect-gateway - release_level: stable - GAPICs: - - proto_path: google/cloud/gkeconnect/gateway/v1beta1 -- api_shortname: gke-multi-cloud - name_pretty: Anthos Multicloud - product_documentation: https://cloud.google.com/anthos/clusters/docs/multi-cloud - api_description: enables you to provision and manage GKE clusters running on AWS - and Azure infrastructure through a centralized Google Cloud backed control plane. - api_id: gkemulticloud.googleapis.com - GAPICs: - - proto_path: google/cloud/gkemulticloud/v1 -- api_shortname: gkehub - name_pretty: GKE Hub API - product_documentation: https://cloud.google.com/anthos/gke/docs/ - api_description: provides a unified way to work with Kubernetes clusters as part - of Anthos, extending GKE to work in multiple environments. You have consistent, - unified, and secure infrastructure, cluster, and container management, whether - you're using Anthos on Google Cloud (with traditional GKE), hybrid cloud, or multiple - public clouds. - release_level: stable - GAPICs: - - proto_path: google/cloud/gkehub/v1 - - proto_path: google/cloud/gkehub/v1alpha - - proto_path: google/cloud/gkehub/v1beta - - proto_path: google/cloud/gkehub/v1beta1 - - proto_path: google/cloud/gkehub/policycontroller/v1beta - - proto_path: google/cloud/gkehub/servicemesh/v1beta -- api_shortname: gkerecommender - name_pretty: GKE Recommender API - product_documentation: - https://cloud.google.com/kubernetes-engine/docs/how-to/machine-learning/inference-quickstart - api_description: lets you analyze the performance and cost-efficiency of your inference - workloads, and make data-driven decisions about resource allocation and model - deployment strategies. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-gkerecommender/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-gkerecommender - api_id: gkerecommender.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/gkerecommender/v1 - requires_billing: true -- api_shortname: containeranalysis - name_pretty: Grafeas - product_documentation: https://grafeas.io - api_description: n/a - client_documentation: https://cloud.google.com/java/docs/reference/grafeas/latest/overview - release_level: stable - distribution_name: io.grafeas:grafeas - codeowner_team: '@googleapis/aap-dpes' - library_name: grafeas - GAPICs: - - proto_path: grafeas/v1 -- api_shortname: gsuiteaddons - name_pretty: Google Workspace Add-ons API - product_documentation: https://developers.google.com/workspace/add-ons/overview - api_description: are customized applications that integrate with Google Workspace - productivity applications. - library_name: gsuite-addons - release_level: stable - GAPICs: - - proto_path: google/cloud/gsuiteaddons/v1 - - proto_path: google/apps/script/type - - proto_path: google/apps/script/type/docs - - proto_path: google/apps/script/type/drive - - proto_path: google/apps/script/type/gmail - - proto_path: google/apps/script/type/sheets - - proto_path: google/apps/script/type/slides -- api_shortname: hypercomputecluster - name_pretty: Cluster Director API - product_documentation: - https://cloud.google.com/blog/products/compute/managed-slurm-and-other-cluster-director-enhancements - api_description: simplifies cluster management across compute, network, and storage - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-hypercomputecluster/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-hypercomputecluster - api_id: hypercomputecluster.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/hypercomputecluster/v1beta - - proto_path: google/cloud/hypercomputecluster/v1 - requires_billing: true -- api_shortname: iam +# - api_shortname: accessapproval +# name_pretty: Access Approval +# product_documentation: https://cloud.google.com/access-approval/docs/ +# api_description: enables controlling access to your organization's data by Google +# personnel. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/accessapproval/v1 +# - api_shortname: accesscontextmanager +# name_pretty: Identity Access Context Manager +# product_documentation: n/a +# api_description: n/a +# release_level: stable +# distribution_name: com.google.cloud:google-identity-accesscontextmanager +# GAPICs: +# - proto_path: google/identity/accesscontextmanager/v1 +# - proto_path: google/identity/accesscontextmanager/type +# - api_shortname: admanager +# name_pretty: Google Ad Manager API +# product_documentation: https://developers.google.com/ad-manager/api/beta +# api_description: The Ad Manager API enables an app to integrate with Google Ad Manager. +# You can read Ad Manager data and run reports using the API. +# client_documentation: https://cloud.google.com/java/docs/reference/ad-manager/latest/overview +# release_level: preview +# distribution_name: com.google.api-ads:ad-manager +# api_id: admanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.api-ads +# cloud_api: false +# GAPICs: +# - proto_path: google/ads/admanager/v1 +# requires_billing: true +# - api_shortname: advisorynotifications +# name_pretty: Advisory Notifications API +# product_documentation: https://cloud.google.com/advisory-notifications/ +# api_description: An API for accessing Advisory Notifications in Google Cloud. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/advisorynotifications/v1 +# - api_shortname: aiplatform +# name_pretty: Vertex AI +# product_documentation: https://cloud.google.com/vertex-ai/docs +# api_description: is an integrated suite of machine learning tools and services for +# building and using ML models with AutoML or custom code. It offers both novices +# and experts the best workbench for the entire machine learning development lifecycle. +# release_level: stable +# rest_documentation: https://cloud.google.com/vertex-ai/docs/reference/rest +# rpc_documentation: https://cloud.google.com/vertex-ai/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/aiplatform/v1 +# - proto_path: google/cloud/aiplatform/v1beta1 +# - api_shortname: alloydb +# name_pretty: AlloyDB +# product_documentation: https://cloud.google.com/alloydb/ +# api_description: AlloyDB is a fully managed, PostgreSQL-compatible database service +# with industry-leading performance, availability, and scale. +# rest_documentation: https://cloud.google.com/alloydb/docs/reference/rest +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/alloydb/v1 +# - proto_path: google/cloud/alloydb/v1alpha +# - proto_path: google/cloud/alloydb/v1beta +# - api_shortname: alloydb +# name_pretty: AlloyDB connectors +# product_documentation: https://cloud.google.com/alloydb/docs +# api_description: AlloyDB is a fully-managed, PostgreSQL-compatible database for +# demanding transactional workloads. It provides enterprise-grade performance and +# availability while maintaining 100% compatibility with open-source PostgreSQL. +# api_id: connectors.googleapis.com +# library_name: alloydb-connectors +# rest_documentation: https://cloud.google.com/alloydb/docs/reference/rest +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/alloydb/connectors/v1 +# - proto_path: google/cloud/alloydb/connectors/v1alpha +# - proto_path: google/cloud/alloydb/connectors/v1beta +# - api_shortname: analyticsadmin +# name_pretty: Analytics Admin +# product_documentation: https://developers.google.com/analytics +# api_description: allows you to manage Google Analytics accounts and properties. +# library_name: analytics-admin +# cloud_api: false +# distribution_name: com.google.analytics:google-analytics-admin +# codeowner_team: '@googleapis/analytics-dpe' +# GAPICs: +# - proto_path: google/analytics/admin/v1alpha +# - proto_path: google/analytics/admin/v1beta +# - api_shortname: analyticsdata +# name_pretty: Analytics Data +# product_documentation: https://developers.google.com/analytics/trusted-testing/analytics-data +# api_description: provides programmatic methods to access report data in Google Analytics +# App+Web properties. +# library_name: analytics-data +# api_id: analytics-data.googleapis.com +# cloud_api: false +# distribution_name: com.google.analytics:google-analytics-data +# codeowner_team: '@googleapis/analytics-dpe' +# GAPICs: +# - proto_path: google/analytics/data/v1alpha +# - proto_path: google/analytics/data/v1beta +# - api_shortname: analyticshub +# name_pretty: Analytics Hub API +# product_documentation: https://cloud.google.com/bigquery/TBD +# api_description: TBD +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/bigquery/analyticshub/v1 +# - api_shortname: apigateway +# name_pretty: API Gateway +# product_documentation: https://cloud.google.com/api-gateway/docs +# api_description: enables you to provide secure access to your backend services through +# a well-defined REST API that is consistent across all of your services, regardless +# of the service implementation. Clients consume your REST APIS to implement standalone +# apps for a mobile device or tablet, through apps running in a browser, or through +# any other type of app that can make a request to an HTTP endpoint. +# library_name: api-gateway +# release_level: stable +# api_id: apigateway.googleapis.com +# rest_documentation: https://cloud.google.com/api-gateway/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/apigateway/v1 +# - api_shortname: apigeeconnect +# name_pretty: Apigee Connect +# product_documentation: https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/ +# api_description: allows the Apigee hybrid management plane to connect securely to +# the MART service in the runtime plane without requiring you to expose the MART +# endpoint on the internet. +# library_name: apigee-connect +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/apigeeconnect/v1 +# - api_shortname: apigee-registry +# name_pretty: Registry API +# product_documentation: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api +# api_description: allows teams to upload and share machine-readable descriptions +# of APIs that are in use and in development. +# api_id: apigeeregistry.googleapis.com +# GAPICs: +# - proto_path: google/cloud/apigeeregistry/v1 +# - api_shortname: apihub +# name_pretty: API hub API +# product_documentation: https://cloud.google.com/apigee/docs/apihub/what-is-api-hub +# api_description: API hub lets you consolidate and organize information about all +# of the APIs of interest to your organization. API hub lets you capture critical +# information about APIs that allows developers to discover and evaluate them +# easily and leverage the work of other teams wherever possible. API platform +# teams can use API hub to have visibility into and manage their portfolio of APIs. +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-apihub/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-apihub +# api_id: apihub.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/apihub/v1 +# requires_billing: true +# - api_shortname: apikeys +# name_pretty: API Keys API +# product_documentation: https://cloud.google.com/api-keys/ +# api_description: API Keys lets you create and manage your API keys for your projects. +# release_level: stable +# GAPICs: +# - proto_path: google/api/apikeys/v2 +# - api_shortname: appengine +# name_pretty: App Engine Admin API +# product_documentation: https://cloud.google.com/appengine/docs/admin-api/ +# api_description: you to manage your App Engine applications. +# library_name: appengine-admin +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# GAPICs: +# - proto_path: google/appengine/v1 +# - api_shortname: apphub +# name_pretty: App Hub API +# product_documentation: https://cloud.google.com/app-hub/docs/overview +# api_description: App Hub simplifies the process of building, running, and managing +# applications on Google Cloud. +# rpc_documentation: https://cloud.google.com/app-hub/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/apphub/v1 +# - api_shortname: appoptimize +# name_pretty: App Optimize API +# product_documentation: https://docs.cloud.google.com/app-optimize/overview +# api_description: The App Optimize API provides developers and platform teams with +# tools to monitor, analyze, and improve the performance and cost-efficiency of +# their cloud applications. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-appoptimize/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-appoptimize +# api_id: appoptimize.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/appoptimize/v1beta +# requires_billing: true +# - api_shortname: area120tables +# name_pretty: Area 120 Tables +# product_documentation: https://area120.google.com/ +# api_description: provides programmatic methods to the Area 120 Tables API. +# library_name: area120-tables +# cloud_api: false +# distribution_name: com.google.area120:google-area120-tables +# GAPICs: +# - proto_path: google/area120/tables/v1alpha1 +# - api_shortname: artifactregistry +# name_pretty: Artifact Registry +# product_documentation: https://cloud.google.com/artifact-registry +# api_description: provides a single place for your organization to manage container +# images and language packages (such as Maven and npm). It is fully integrated with +# Google Cloud's tooling and runtimes and comes with support for native artifact +# protocols. This makes it simple to integrate it with your CI/CD tooling to set +# up automated pipelines. +# library_name: artifact-registry +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/artifact-registry/docs/reference/rest +# rpc_documentation: https://cloud.google.com/artifact-registry/docs/reference/rpc +# GAPICs: +# - proto_path: google/devtools/artifactregistry/v1 +# - proto_path: google/devtools/artifactregistry/v1beta2 +# - api_shortname: cloudasset +# name_pretty: Cloud Asset Inventory +# product_documentation: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview +# api_description: provides inventory services based on a time series database. This +# database keeps a five week history of Google Cloud asset metadata. The Cloud Asset +# Inventory export service allows you to export all asset metadata at a certain +# timestamp or export event change history during a timeframe. +# library_name: asset +# release_level: stable +# api_reference: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview +# issue_tracker: https://issuetracker.google.com/issues/new?component=187210&template=0 +# GAPICs: +# - proto_path: google/cloud/asset/v1 +# - proto_path: google/cloud/asset/v1p1beta1 +# - proto_path: google/cloud/asset/v1p2beta1 +# - proto_path: google/cloud/asset/v1p5beta1 +# - proto_path: google/cloud/asset/v1p7beta1 +# - api_shortname: assuredworkloads +# name_pretty: Assured Workloads for Government +# product_documentation: https://cloud.google.com/assured-workloads/ +# api_description: allows you to secure your government workloads and accelerate your +# path to running compliant workloads on Google Cloud with Assured Workloads for +# Government. +# library_name: assured-workloads +# release_level: stable +# rest_documentation: https://cloud.google.com/assured-workloads/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/assuredworkloads/v1 +# - proto_path: google/cloud/assuredworkloads/v1beta1 +# - api_shortname: auditmanager +# name_pretty: Audit Manager API +# product_documentation: https://cloud.google.com/audit-manager/docs +# api_description: Lists information about the supported locations for this service. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-auditmanager/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-auditmanager +# api_id: auditmanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/auditmanager/v1 +# requires_billing: true +# - api_shortname: automl +# name_pretty: Cloud Auto ML +# product_documentation: https://cloud.google.com/automl/docs/ +# api_description: makes the power of machine learning available to you even if you +# have limited knowledge of machine learning. You can use AutoML to build on Google's +# machine learning capabilities to create your own custom machine learning models +# that are tailored to your business needs, and then integrate those models into +# your applications and web sites. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559744 +# rest_documentation: https://cloud.google.com/automl/docs/reference/rest +# rpc_documentation: https://cloud.google.com/automl/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/automl/v1 +# - proto_path: google/cloud/automl/v1beta1 +# - api_shortname: backupdr +# name_pretty: Backup and DR Service API +# product_documentation: https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-dr +# api_description: 'Backup and DR Service is a powerful, centralized, cloud-first +# backup and disaster recovery solution for cloud-based and hybrid workloads. ' +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/overview +# release_level: stable +# distribution_name: com.google.cloud:google-cloud-backupdr +# api_id: backupdr.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/backupdr/v1 +# requires_billing: true +# - api_shortname: baremetalsolution +# name_pretty: Bare Metal Solution +# product_documentation: https://cloud.google.com/bare-metal/docs +# api_description: Bring your Oracle workloads to Google Cloud with Bare Metal Solution +# and jumpstart your cloud journey with minimal risk. +# library_name: bare-metal-solution +# rest_documentation: https://cloud.google.com/bare-metal/docs/reference/rest +# rpc_documentation: https://cloud.google.com/bare-metal/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/baremetalsolution/v2 +# - api_shortname: batch +# name_pretty: Cloud Batch +# product_documentation: https://cloud.google.com/ +# api_description: n/a +# GAPICs: +# - proto_path: google/cloud/batch/v1 +# - proto_path: google/cloud/batch/v1alpha +# - api_shortname: beyondcorp-appconnections +# name_pretty: BeyondCorp AppConnections +# product_documentation: https://cloud.google.com/beyondcorp-enterprise/ +# api_description: is Google's implementation of the zero trust model. It builds upon +# a decade of experience at Google, combined with ideas and best practices from +# the community. By shifting access controls from the network perimeter to individual +# users, BeyondCorp enables secure work from virtually any location without the +# need for a traditional VPN. +# GAPICs: +# - proto_path: google/cloud/beyondcorp/appconnections/v1 +# - api_shortname: beyondcorp-appconnectors +# name_pretty: BeyondCorp AppConnectors +# product_documentation: cloud.google.com/beyondcorp-enterprise/ +# api_description: provides methods to manage (create/read/update/delete) BeyondCorp +# AppConnectors. +# GAPICs: +# - proto_path: google/cloud/beyondcorp/appconnectors/v1 +# - api_shortname: beyondcorp-appgateways +# name_pretty: BeyondCorp AppGateways +# product_documentation: https://cloud.google.com/beyondcorp-enterprise/ +# api_description: A zero trust solution that enables secure access to applications +# and resources, and offers integrated threat and data protection. +# api_id: beyondcorp.googleapis.com +# GAPICs: +# - proto_path: google/cloud/beyondcorp/appgateways/v1 +# - api_shortname: beyondcorp-clientconnectorservices +# name_pretty: BeyondCorp ClientConnectorServices +# product_documentation: https://cloud.google.com/beyondcorp-enterprise/ +# api_description: A zero trust solution that enables secure access to applications +# and resources, and offers integrated threat and data protection. +# api_id: beyondcorp.googleapis.com +# GAPICs: +# - proto_path: google/cloud/beyondcorp/clientconnectorservices/v1 +# - api_shortname: beyondcorp-clientgateways +# name_pretty: BeyondCorp ClientGateways +# product_documentation: https://cloud.google.com/beyondcorp-enterprise/ +# api_description: A zero trust solution that enables secure access to applications +# and resources, and offers integrated threat and data protection. +# api_id: beyondcorp.googleapis.com +# GAPICs: +# - proto_path: google/cloud/beyondcorp/clientgateways/v1 +# - api_shortname: biglake +# name_pretty: BigLake +# product_documentation: https://cloud.google.com/biglake +# api_description: The BigLake API provides access to BigLake Metastore, a serverless, +# fully managed, and highly available metastore for open-source data that can be +# used for querying Apache Iceberg tables in BigQuery. +# GAPICs: +# - proto_path: google/cloud/bigquery/biglake/v1 +# - proto_path: google/cloud/biglake/v1 +# - proto_path: google/cloud/bigquery/biglake/v1alpha1 +# - proto_path: google/cloud/biglake/hive/v1beta +# - api_shortname: analyticshub +# name_pretty: Analytics Hub +# product_documentation: https://cloud.google.com/analytics-hub +# api_description: is a data exchange that allows you to efficiently and securely +# exchange data assets across organizations to address challenges of data reliability +# and cost. +# library_name: bigquery-data-exchange +# GAPICs: +# - proto_path: google/cloud/bigquery/dataexchange/v1beta1 +# - api_shortname: bigqueryconnection +# name_pretty: Cloud BigQuery Connection +# product_documentation: https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest +# api_description: allows users to manage BigQuery connections to external data sources. +# release_level: stable +# client_documentation: +# https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1beta1 +# GAPICs: +# - proto_path: google/cloud/bigquery/connection/v1 +# - proto_path: google/cloud/bigquery/connection/v1beta1 +# - api_shortname: bigquerydatapolicy +# name_pretty: BigQuery DataPolicy API +# product_documentation: https://cloud.google.com/bigquery/docs/reference/datapolicy/ +# api_description: '' +# GAPICs: +# - proto_path: google/cloud/bigquery/datapolicies/v1 +# - proto_path: google/cloud/bigquery/datapolicies/v1beta1 +# - proto_path: google/cloud/bigquery/datapolicies/v2beta1 +# - proto_path: google/cloud/bigquery/datapolicies/v2 +# - api_shortname: bigquerydatatransfer +# name_pretty: BigQuery Data Transfer Service +# product_documentation: https://cloud.google.com/bigquery/transfer/ +# api_description: transfers data from partner SaaS applications to Google BigQuery +# on a scheduled, managed basis. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559654 +# GAPICs: +# - proto_path: google/cloud/bigquery/datatransfer/v1 +# - api_shortname: bigquerymigration +# name_pretty: BigQuery Migration +# product_documentation: https://cloud.google.com/bigquery/docs +# api_description: BigQuery Migration API +# rest_documentation: https://cloud.google.com/bigquery/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/bigquery/migration/v2 +# - proto_path: google/cloud/bigquery/migration/v2alpha +# - api_shortname: bigqueryreservation +# name_pretty: Cloud BigQuery Reservation +# product_documentation: https://cloud.google.com/bigquery/docs/reference/reservations/rpc +# api_description: allows users to manage their flat-rate BigQuery reservations. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/bigquery/reservation/v1 +# - api_shortname: bigquerystorage +# name_pretty: BigQuery Storage +# product_documentation: https://cloud.google.com/bigquery/docs/reference/storage/ +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/history +# api_description: is an API for reading data stored in BigQuery. This API provides +# direct, high-throughput read access to existing BigQuery tables, supports parallel +# access with automatic liquid sharding, and allows fine-grained control over what +# data is returned. +# issue_tracker: https://issuetracker.google.com/savedsearches/559654 +# release_level: stable +# language: java +# distribution_name: com.google.cloud:google-cloud-bigquerystorage +# codeowner_team: '@googleapis/bigquery-team' +# api_id: bigquerystorage.googleapis.com +# transport: grpc +# requires_billing: true +# library_type: GAPIC_COMBO +# recommended_package: com.google.cloud.bigquery.storage.v1 +# GAPICs: +# - proto_path: google/cloud/bigquery/storage/v1 +# - proto_path: google/cloud/bigquery/storage/v1alpha +# - proto_path: google/cloud/bigquery/storage/v1beta1 +# - proto_path: google/cloud/bigquery/storage/v1beta2 +# - proto_path: google/cloud/bigquery/storage/v1beta +# - api_shortname: cloudbilling +# name_pretty: Cloud Billing +# product_documentation: https://cloud.google.com/billing/docs +# api_description: allows developers to manage their billing accounts or browse the +# catalog of SKUs and pricing. +# library_name: billing +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559770 +# rest_documentation: https://cloud.google.com/billing/docs/reference/rest +# rpc_documentation: https://cloud.google.com/billing/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/billing/v1 +# - api_shortname: billingbudgets +# name_pretty: Cloud Billing Budgets +# product_documentation: https://cloud.google.com/billing/docs/how-to/budgets +# api_description: allows you to avoid surprises on your bill by creating budgets +# to monitor all your Google Cloud charges in one place. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/billing/budgets/v1 +# - proto_path: google/cloud/billing/budgets/v1beta1 +# - api_shortname: binaryauthorization +# name_pretty: Binary Authorization +# product_documentation: https://cloud.google.com/binary-authorization/docs +# api_description: ' is a service on Google Cloud that provides centralized software +# supply-chain security for applications that run on Google Kubernetes Engine (GKE) +# and Anthos clusters on VMware' +# library_name: binary-authorization +# release_level: stable +# api_id: binaryauthorization.googleapis.com +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/binary-authorization/docs/reference/rest +# rpc_documentation: https://cloud.google.com/binary-authorization/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/binaryauthorization/v1 +# - proto_path: google/cloud/binaryauthorization/v1beta1 +# - api_shortname: capacityplanner +# name_pretty: Capacity Planner API +# product_documentation: https://cloud.google.com/capacity-planner/docs +# api_description: Provides programmatic access to Capacity Planner features. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-capacityplanner/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-capacityplanner +# api_id: capacityplanner.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/capacityplanner/v1beta +# requires_billing: true +# - api_shortname: certificatemanager +# name_pretty: Certificate Manager +# product_documentation: https://cloud.google.com/certificate-manager/docs +# api_description: lets you acquire and manage TLS (SSL) certificates for use with +# Cloud Load Balancing. +# library_name: certificate-manager +# api_id: certificatemanager.googleapis.com +# GAPICs: +# - proto_path: google/cloud/certificatemanager/v1 +# - api_shortname: ces +# name_pretty: Gemini Enterprise for Customer Experience API +# product_documentation: https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps +# api_description: Customer Experience Agent Studio (CX Agent Studio) is a minimal +# code conversational agent builder. +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-ces/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-ces +# api_id: ces.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/ces/v1 +# - proto_path: google/cloud/ces/v1beta +# requires_billing: true +# rpc_documentation: +# https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/rpc +# - api_shortname: cloudchannel +# name_pretty: Channel Services +# product_documentation: https://cloud.google.com/channel/docs +# api_description: With Channel Services, Google Cloud partners and resellers have +# a single unified resale platform, with a unified resale catalog, customer management, +# order management, billing management, policy and authorization management, and +# cost management. +# library_name: channel +# release_level: stable +# rest_documentation: https://cloud.google.com/channel/docs/reference/rest +# rpc_documentation: https://cloud.google.com/channel/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/channel/v1 +# - api_shortname: chat +# name_pretty: Google Chat API +# product_documentation: https://developers.google.com/chat/concepts +# api_description: The Google Chat API lets you build Chat apps to integrate your +# services with Google Chat and manage Chat resources such as spaces, members, and +# messages. +# rest_documentation: https://developers.google.com/chat/api/reference/rest +# GAPICs: +# - proto_path: google/chat/v1 +# - api_shortname: chronicle +# name_pretty: Chronicle API +# product_documentation: https://cloud.google.com/chronicle/docs/secops/secops-overview +# api_description: The Google Cloud Security Operations API, popularly known as the +# Chronicle API, serves endpoints that enable security analysts to analyze and mitigate +# a security threat throughout its lifecycle +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-chronicle/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-chronicle +# api_id: chronicle.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/chronicle/v1 +# requires_billing: true +# - api_shortname: cloudapiregistry +# name_pretty: Cloud API Registry API +# product_documentation: https://docs.cloud.google.com/api-registry/docs/overview +# api_description: Cloud API Registry lets you discover, govern, use, and monitor +# Model Context Protocol (MCP) servers and tools provided by Google, or by your +# organization through Apigee API hub. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-cloudapiregistry/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-cloudapiregistry +# api_id: cloudapiregistry.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/apiregistry/v1beta +# - proto_path: google/cloud/apiregistry/v1 +# requires_billing: true +# - api_shortname: cloudbuild +# name_pretty: Cloud Build +# product_documentation: https://cloud.google.com/cloud-build/ +# api_description: lets you build software quickly across all languages. Get complete +# control over defining custom workflows for building, testing, and deploying across +# multiple environments such as VMs, serverless, Kubernetes, or Firebase. +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# distribution_name: com.google.cloud:google-cloud-build +# issue_tracker: https://issuetracker.google.com/savedsearches/5226584 +# GAPICs: +# - proto_path: google/devtools/cloudbuild/v1 +# - proto_path: google/devtools/cloudbuild/v2 +# - api_shortname: cloudcommerceconsumerprocurement +# name_pretty: Cloud Commerce Consumer Procurement +# product_documentation: https://cloud.google.com/marketplace/ +# api_description: Find top solutions integrated with Google Cloud to accelerate your +# digital transformation. Scale and simplify procurement for your organization with +# online discovery, flexible purchasing, and fulfillment of enterprise-grade cloud +# solutions. +# GAPICs: +# - proto_path: google/cloud/commerce/consumer/procurement/v1 +# - proto_path: google/cloud/commerce/consumer/procurement/v1alpha1 +# - api_shortname: cloudcontrolspartner +# name_pretty: Cloud Controls Partner API +# product_documentation: https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners +# api_description: Provides insights about your customers and their Assured Workloads +# based on your Sovereign Controls by Partners offering. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/cloudcontrolspartner/v1 +# - proto_path: google/cloud/cloudcontrolspartner/v1beta +# - api_shortname: cloudquotas +# name_pretty: Cloud Quotas API +# product_documentation: https://cloud.google.com/cloudquotas/docs/ +# api_description: "Cloud Quotas API provides GCP service consumers with management +# and\n observability for resource usage, quotas, and restrictions of the services\n\ +# \ they consume." +# release_level: stable +# GAPICs: +# - proto_path: google/api/cloudquotas/v1 +# - proto_path: google/api/cloudquotas/v1beta +# - api_shortname: cloudsecuritycompliance +# name_pretty: Cloud Security Compliance API +# product_documentation: +# https://cloud.google.com/security-command-center/docs/compliance-manager-overview +# api_description: Compliance Manager uses software-defined controls that let you +# assess support for multiple compliance programs and security requirements within +# a Google Cloud organization +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-cloudsecuritycompliance/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-cloudsecuritycompliance +# api_id: cloudsecuritycompliance.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/cloudsecuritycompliance/v1 +# requires_billing: true +# - api_shortname: cloudsupport +# name_pretty: Google Cloud Support API +# product_documentation: https://cloud.google.com/support/docs/reference/support-api/ +# api_description: Manages Google Cloud technical support cases for Customer Care +# support offerings. +# GAPICs: +# - proto_path: google/cloud/support/v2 +# - proto_path: google/cloud/support/v2beta +# - api_shortname: compute +# name_pretty: Compute Engine +# product_documentation: https://cloud.google.com/compute/ +# api_description: "delivers virtual machines running in Google's innovative data +# centers and worldwide fiber network. Compute Engine's tooling and workflow support +# enable scaling from single instances to global, load-balanced cloud computing. +# Compute Engine's VMs boot quickly, come with persistent disk storage, deliver +# consistent performance and are available in many configurations. " +# release_level: stable +# excluded_poms: grpc-google-cloud-compute-v1 +# excluded_dependencies: grpc-google-cloud-compute-v1 +# GAPICs: +# - proto_path: google/cloud/compute/v1 +# - api_shortname: confidentialcomputing +# name_pretty: Confidential Computing API +# product_documentation: https://cloud.google.com/confidential-computing/ +# api_description: Protect data in-use with Confidential VMs, Confidential GKE, Confidential +# Dataproc, and Confidential Space. +# GAPICs: +# - proto_path: google/cloud/confidentialcomputing/v1 +# - proto_path: google/cloud/confidentialcomputing/v1alpha1 +# - api_shortname: configdelivery +# name_pretty: Config Delivery API +# product_documentation: +# https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages +# api_description: ConfigDelivery service manages the deployment of kubernetes configuration +# to a fleet of kubernetes clusters. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-configdelivery/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-configdelivery +# api_id: configdelivery.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# requires_billing: true +# rest_documentation: +# https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/configdelivery/v1beta +# - proto_path: google/cloud/configdelivery/v1 +# - api_shortname: connectgateway +# name_pretty: Connect Gateway API +# product_documentation: +# https://cloud.google.com/kubernetes-engine/enterprise/multicluster-management/gateway +# api_description: The Connect Gateway service allows connectivity from external parties +# to connected Kubernetes clusters. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-connectgateway/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-connectgateway +# api_id: connectgateway.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/gkeconnect/gateway/v1 +# requires_billing: true +# - api_shortname: contactcenterinsights +# name_pretty: CCAI Insights +# product_documentation: https://cloud.google.com/dialogflow/priv/docs/insights/ +# api_description: ' helps users detect and visualize patterns in their contact center +# data.' +# library_name: contact-center-insights +# release_level: stable +# codeowner_team: '@googleapis/api-contact-center-insights' +# GAPICs: +# - proto_path: google/cloud/contactcenterinsights/v1 +# - api_shortname: container +# name_pretty: Kubernetes Engine +# product_documentation: https://cloud.google.com/kubernetes-engine/ +# api_description: is an enterprise-grade platform for containerized applications, +# including stateful and stateless, AI and ML, Linux and Windows, complex and simple +# web apps, API, and backend services. Leverage industry-first features like four-way +# auto-scaling and no-stress management. Optimize GPU and TPU provisioning, use +# integrated developer tools, and get multi-cluster support from SREs. +# release_level: stable +# codeowner_team: '@googleapis/cloud-sdk-java-team' +# issue_tracker: https://issuetracker.google.com/savedsearches/559777 +# rest_documentation: https://cloud.google.com/kubernetes-engine/docs/reference/rest +# GAPICs: +# - proto_path: google/container/v1 +# - proto_path: google/container/v1beta1 +# - api_shortname: containeranalysis +# name_pretty: Cloud Container Analysis +# product_documentation: https://cloud.google.com/container-registry/docs/container-analysis +# api_description: is a service that provides vulnerability scanning and metadata +# storage for software artifacts. The service performs vulnerability scans on built +# software artifacts, such as the images in Container Registry, then stores the +# resulting metadata and makes it available for consumption through an API. The +# metadata may come from several sources, including vulnerability scanning, other +# Cloud services, and third-party providers. +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# issue_tracker: https://issuetracker.google.com/savedsearches/559777 +# GAPICs: +# - proto_path: google/devtools/containeranalysis/v1 +# - proto_path: google/devtools/containeranalysis/v1beta1 +# - api_shortname: contentwarehouse +# name_pretty: Document AI Warehouse +# product_documentation: https://cloud.google.com/document-warehouse/docs/overview +# api_description: Document AI Warehouse is an integrated cloud-native GCP platform +# to store, search, organize, govern and analyze documents and their structured +# metadata. +# GAPICs: +# - proto_path: google/cloud/contentwarehouse/v1 +# - api_shortname: datafusion +# name_pretty: Cloud Data Fusion +# product_documentation: https://cloud.google.com/data-fusion/docs +# api_description: is a fully managed, cloud-native, enterprise data integration service +# for quickly building and managing data pipelines. +# library_name: data-fusion +# release_level: stable +# rest_documentation: https://cloud.google.com/data-fusion/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/datafusion/v1 +# - proto_path: google/cloud/datafusion/v1beta1 +# - api_shortname: databasecenter +# name_pretty: Database Center API +# product_documentation: https://cloud.google.com/database-center/docs/overview +# api_description: Database Center provides an organization-wide, cross-product fleet +# health platform to eliminate the overhead, complexity, and risk associated with +# aggregating and summarizing health signals through custom dashboards. Through +# Database Center’s fleet health dashboard and API, database platform teams that +# are responsible for reliability, compliance, security, cost, and administration +# of database fleets will now have a single pane of glass that pinpoints issues +# relevant to each team. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-databasecenter +# api_id: databasecenter.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/databasecenter/v1beta +# requires_billing: true +# - api_shortname: datacatalog +# name_pretty: Data Catalog +# product_documentation: https://cloud.google.com/data-catalog +# api_description: is a fully managed and highly scalable data discovery and metadata +# management service. +# release_level: stable +# issue_tracker: '' +# GAPICs: +# - proto_path: google/cloud/datacatalog/v1 +# - proto_path: google/cloud/datacatalog/v1beta1 +# - api_shortname: dataflow +# name_pretty: Dataflow +# product_documentation: https://cloud.google.com/dataflow/docs +# api_description: is a managed service for executing a wide variety of data processing +# patterns. +# rest_documentation: https://cloud.google.com/dataflow/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dataflow/docs/reference/rpc +# GAPICs: +# - proto_path: google/dataflow/v1beta3 +# - api_shortname: dataform +# name_pretty: Cloud Dataform +# product_documentation: https://cloud.google.com/dataform/docs +# api_description: Help analytics teams manage data inside BigQuery using SQL. +# GAPICs: +# - proto_path: google/cloud/dataform/v1beta1 +# - proto_path: google/cloud/dataform/v1 +# - api_shortname: datalabeling +# name_pretty: Data Labeling +# product_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/ +# api_description: is a service that lets you work with human labelers to generate +# highly accurate labels for a collection of data that you can use to train your +# machine learning models. +# issue_tracker: '' +# rest_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/reference/rest +# rpc_documentation: https://cloud.google.com/ai-platform/data-labeling/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/datalabeling/v1beta1 +# - api_shortname: datalineage +# name_pretty: Data Lineage +# product_documentation: https://cloud.google.com/dataplex/docs/about-data-lineage +# api_description: Lineage is used to track data flows between assets over time. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/datacatalog/lineage/v1 +# - proto_path: google/cloud/datacatalog/lineage/configmanagement/v1 +# - api_shortname: datamanager +# name_pretty: Data Manager API +# product_documentation: https://developers.google.com/data-manager +# api_description: A unified ingestion API for data partners, agencies and advertisers +# to connect first-party data across Google advertising products. +# client_documentation: https://cloud.google.com/java/docs/reference/data-manager/latest/overview +# release_level: preview +# distribution_name: com.google.api-ads:data-manager +# api_id: datamanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.api-ads +# cloud_api: false +# GAPICs: +# - proto_path: google/ads/datamanager/v1 +# library_name: datamanager +# requires_billing: true +# rpc_documentation: https://developers.google.com/data-manager/api/reference/rpc +# - api_shortname: dataplex +# name_pretty: Cloud Dataplex +# product_documentation: https://cloud.google.com/dataplex +# api_description: provides intelligent data fabric that enables organizations to +# centrally manage, monitor, and govern their data across data lakes, data warehouses, +# and data marts with consistent controls, providing access to trusted data and +# powering analytics at scale. +# release_level: stable +# rest_documentation: https://cloud.google.com/dataplex/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dataplex/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/dataplex/v1 +# - api_shortname: dataproc +# name_pretty: Dataproc +# product_documentation: https://cloud.google.com/dataproc +# api_description: is a faster, easier, more cost-effective way to run Apache Spark +# and Apache Hadoop. +# release_level: stable +# codeowner_team: '@googleapis/api-dataproc' +# issue_tracker: https://issuetracker.google.com/savedsearches/559745 +# rest_documentation: https://cloud.google.com/dataproc/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dataproc/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/dataproc/v1 +# - api_shortname: metastore +# name_pretty: Dataproc Metastore +# product_documentation: https://cloud.google.com/dataproc-metastore/docs +# api_description: is a fully managed, highly available, autoscaled, autohealing, +# OSS-native metastore service that greatly simplifies technical metadata management. +# Dataproc Metastore service is based on Apache Hive metastore and serves as a critical +# component towards enterprise data lakes. +# library_name: dataproc-metastore +# release_level: stable +# rest_documentation: https://cloud.google.com/dataproc-metastore/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dataproc-metastore/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/metastore/v1 +# - proto_path: google/cloud/metastore/v1alpha +# - proto_path: google/cloud/metastore/v1beta +# - api_shortname: datastore +# name_pretty: Cloud Datastore +# product_documentation: https://cloud.google.com/datastore +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-datastore/latest/history +# issue_tracker: https://issuetracker.google.com/savedsearches/559768 +# release_level: stable +# language: java +# distribution_name: com.google.cloud:google-cloud-datastore +# api_id: datastore.googleapis.com +# library_type: GAPIC_COMBO +# api_description: is a fully managed, schemaless database for\nstoring non-relational +# data. Cloud Datastore automatically scales with\nyour users and supports ACID +# transactions, high availability of reads and\nwrites, strong consistency for reads +# and ancestor queries, and eventual\nconsistency for all other queries. +# excluded_dependencies: grpc-google-cloud-datastore-v1 +# extra_versioned_modules: datastore-v1-proto-client +# excluded_poms: grpc-google-cloud-datastore-v1 +# recommended_package: com.google.cloud.datastore +# GAPICs: +# - proto_path: google/datastore/v1 +# - proto_path: google/datastore/admin/v1 +# - api_shortname: datastream +# name_pretty: Datastream +# product_documentation: https://cloud.google.com/datastream/docs +# api_description: is a serverless and easy-to-use change data capture (CDC) and replication +# service. It allows you to synchronize data across heterogeneous databases and +# applications reliably, and with minimal latency and downtime. +# release_level: stable +# rest_documentation: https://cloud.google.com/datastream/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/datastream/v1 +# - proto_path: google/cloud/datastream/v1alpha1 +# - api_shortname: clouddeploy +# name_pretty: Google Cloud Deploy +# product_documentation: https://cloud.google.com/deploy/docs +# api_description: is a service that automates delivery of your applications to a +# series of target environments in a defined sequence +# library_name: deploy +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# GAPICs: +# - proto_path: google/cloud/deploy/v1 +# - api_shortname: developerconnect +# name_pretty: Developer Connect API +# product_documentation: https://cloud.google.com/developer-connect/docs/overview +# api_description: Connect third-party source code management to Google +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-developerconnect/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-developerconnect +# api_id: developerconnect.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/developerconnect/v1 +# requires_billing: true +# - api_shortname: devicestreaming +# name_pretty: Device Streaming API +# product_documentation: https://cloud.google.com/device-streaming/docs +# api_description: The Cloud API for device streaming usage. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-devicestreaming/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-devicestreaming +# api_id: devicestreaming.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/devicestreaming/v1 +# requires_billing: true +# - api_shortname: dialogflow +# name_pretty: Dialogflow API +# product_documentation: https://cloud.google.com/dialogflow-enterprise/ +# api_description: is an end-to-end, build-once deploy-everywhere development suite +# for creating conversational interfaces for websites, mobile applications, popular +# messaging platforms, and IoT devices. You can use it to build interfaces (such +# as chatbots and conversational IVR) that enable natural and rich interactions +# between your users and your business. Dialogflow Enterprise Edition users have +# access to Google Cloud Support and a service level agreement (SLA) for production +# deployments. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/5300385 +# GAPICs: +# - proto_path: google/cloud/dialogflow/v2 +# - proto_path: google/cloud/dialogflow/v2beta1 +# - api_shortname: dialogflow-cx +# name_pretty: Dialogflow CX +# product_documentation: https://cloud.google.com/dialogflow/cx/docs +# api_description: provides a new way of designing agents, taking a state machine +# approach to agent design. This gives you clear and explicit control over a conversation, +# a better end-user experience, and a better development workflow. +# rest_documentation: https://cloud.google.com/dialogflow/cx/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dialogflow/cx/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/dialogflow/cx/v3 +# - proto_path: google/cloud/dialogflow/cx/v3beta1 +# - api_shortname: discoveryengine +# name_pretty: Discovery Engine API +# product_documentation: https://cloud.google.com/discovery-engine/media/docs +# api_description: A Cloud API that offers search and recommendation discoverability +# for documents from different industry verticals (e.g. media, retail, etc.). +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/discoveryengine/v1 +# - proto_path: google/cloud/discoveryengine/v1alpha +# - proto_path: google/cloud/discoveryengine/v1beta +# - api_shortname: distributedcloudedge +# name_pretty: Google Distributed Cloud Edge +# product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/ +# api_description: Google Distributed Cloud Edge allows you to run Kubernetes clusters +# on dedicated hardware provided and maintained by Google that is separate from +# the Google Cloud data center. +# api_id: edgecontainer.googleapis.com +# library_name: distributedcloudedge +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/edgecontainer/v1 +# - api_shortname: dlp +# name_pretty: Cloud Data Loss Prevention +# product_documentation: https://cloud.google.com/dlp/docs/ +# api_description: provides programmatic access to a powerful detection engine for +# personally identifiable information and other privacy-sensitive data in unstructured +# data streams, like text blocks and images. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/5548083 +# rest_documentation: https://cloud.google.com/dlp/docs/reference/rest +# rpc_documentation: https://cloud.google.com/dlp/docs/reference/rpc +# GAPICs: +# - proto_path: google/privacy/dlp/v2 +# - api_shortname: datamigration +# name_pretty: Database Migration Service +# product_documentation: https://cloud.google.com/database-migration/docs +# api_description: makes it easier for you to migrate your data to Google Cloud. This +# service helps you lift and shift your MySQL and PostgreSQL workloads into Cloud +# SQL. +# library_name: dms +# release_level: stable +# api_id: datamigration.googleapis.com +# rest_documentation: https://cloud.google.com/database-migration/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/clouddms/v1 +# - api_shortname: documentai +# name_pretty: Document AI +# product_documentation: https://cloud.google.com/compute/docs/documentai/ +# api_description: allows developers to unlock insights from your documents with machine +# learning. +# library_name: document-ai +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559755 +# GAPICs: +# - proto_path: google/cloud/documentai/v1 +# - proto_path: google/cloud/documentai/v1beta3 +# - api_shortname: domains +# name_pretty: Cloud Domains +# product_documentation: https://cloud.google.com/domains +# api_description: allows you to register and manage domains by using Cloud Domains. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/domains/v1 +# - proto_path: google/cloud/domains/v1alpha2 +# - proto_path: google/cloud/domains/v1beta1 +# - api_shortname: edgenetwork +# name_pretty: Distributed Cloud Edge Network API +# product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs/overview +# api_description: Network management API for Distributed Cloud Edge. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/edgenetwork/v1 +# - api_shortname: enterpriseknowledgegraph +# name_pretty: Enterprise Knowledge Graph +# product_documentation: https://cloud.google.com/enterprise-knowledge-graph/docs/overview +# api_description: Enterprise Knowledge Graph organizes siloed information into organizational +# knowledge, which involves consolidating, standardizing, and reconciling data in +# an efficient and useful way. +# GAPICs: +# - proto_path: google/cloud/enterpriseknowledgegraph/v1 +# - api_shortname: clouderrorreporting +# name_pretty: Error Reporting +# product_documentation: https://cloud.google.com/error-reporting +# api_description: 'counts, analyzes, and aggregates the crashes in your running cloud +# services. A centralized error management interface displays the results with sorting +# and filtering capabilities. A dedicated view shows the error details: time chart, +# occurrences, affected user count, first- and last-seen dates and a cleaned exception +# stack trace. Opt in to receive email and mobile alerts on new errors.' +# library_name: errorreporting +# issue_tracker: https://issuetracker.google.com/savedsearches/559780 +# requires_billing: false +# GAPICs: +# - proto_path: google/devtools/clouderrorreporting/v1beta1 +# - api_shortname: essentialcontacts +# name_pretty: Essential Contacts API +# product_documentation: https://cloud.google.com/resource-manager/docs/managing-notification-contacts/ +# api_description: helps you customize who receives notifications by providing your +# own list of contacts in many Google Cloud services. +# library_name: essential-contacts +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/essentialcontacts/v1 +# - api_shortname: eventarc +# name_pretty: Eventarc +# product_documentation: https://cloud.google.com/eventarc/docs +# api_description: lets you asynchronously deliver events from Google services, SaaS, +# and your own apps using loosely coupled services that react to state changes. +# Eventarc requires no infrastructure management, you can optimize productivity +# and costs while building a modern, event-driven solution. +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/eventarc/docs/reference/rest +# rpc_documentation: https://cloud.google.com/eventarc/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/eventarc/v1 +# - api_shortname: eventarcpublishing +# name_pretty: Eventarc Publishing +# product_documentation: https://cloud.google.com/eventarc/docs +# api_description: lets you asynchronously deliver events from Google services, SaaS, +# and your own apps using loosely coupled services that react to state changes. +# library_name: eventarc-publishing +# api_id: eventarc-publishing.googleapis.com +# rest_documentation: https://cloud.google.com/eventarc/docs/reference/rest +# rpc_documentation: https://cloud.google.com/eventarc/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/eventarc/publishing/v1 +# - api_shortname: file +# name_pretty: Cloud Filestore API +# product_documentation: https://cloud.google.com/filestore/docs +# api_description: instances are fully managed NFS file servers on Google Cloud for +# use with applications running on Compute Engine virtual machines (VMs) instances +# or Google Kubernetes Engine clusters. +# library_name: filestore +# release_level: stable +# rest_documentation: https://cloud.google.com/filestore/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/filestore/v1 +# - proto_path: google/cloud/filestore/v1beta1 +# - api_shortname: financialservices +# name_pretty: Financial Services API +# product_documentation: +# https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview +# api_description: Google Cloud's Anti Money Laundering AI (AML AI) product is an +# API that scores AML risk. Use it to identify more risk, more defensibly, with +# fewer false positives and reduced time per review. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-financialservices/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-financialservices +# api_id: financialservices.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/financialservices/v1 +# requires_billing: true +# - api_shortname: cloudfunctions +# name_pretty: Cloud Functions +# product_documentation: https://cloud.google.com/functions +# api_description: is a scalable pay as you go Functions-as-a-Service (FaaS) to run +# your code with zero server management. +# library_name: functions +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/functions/docs/reference/rest +# rpc_documentation: https://cloud.google.com/functions/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/functions/v1 +# - proto_path: google/cloud/functions/v2 +# - proto_path: google/cloud/functions/v2alpha +# - proto_path: google/cloud/functions/v2beta +# - api_shortname: gdchardwaremanagement +# name_pretty: GDC Hardware Management API +# product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs +# api_description: Google Distributed Cloud connected allows you to run Kubernetes +# clusters on dedicated hardware provided and maintained by Google that is separate +# from the Google Cloud data center. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-gdchardwaremanagement +# api_id: gdchardwaremanagement.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/gdchardwaremanagement/v1alpha +# requires_billing: true +# rpc_documentation: +# https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc +# - api_shortname: geminidataanalytics +# name_pretty: Data Analytics API with Gemini +# product_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/overview +# api_description: Use Conversational Analytics API to build an artificial intelligence +# (AI)-powered chat interface, or data agent, that answers questions about structured +# data using natural language. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-geminidataanalytics +# api_id: geminidataanalytics.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/geminidataanalytics/v1beta +# requires_billing: true +# rpc_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/reference +# - api_shortname: gke-backup +# name_pretty: Backup for GKE +# product_documentation: 'https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/concepts/backup-for-gke ' +# api_description: is a service for backing up and restoring workloads in GKE. +# api_id: gkebackup.googleapis.com +# library_name: gke-backup +# GAPICs: +# - proto_path: google/cloud/gkebackup/v1 +# - api_shortname: connectgateway +# name_pretty: Connect Gateway API +# product_documentation: https://cloud.google.com/anthos/multicluster-management/gateway/ +# api_description: builds on the power of fleets to let Anthos users connect to and +# run commands against registered Anthos clusters in a simple, consistent, and secured +# way, whether the clusters are on Google Cloud, other public clouds, or on premises, +# and makes it easier to automate DevOps processes across all your clusters. +# library_name: gke-connect-gateway +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/gkeconnect/gateway/v1beta1 +# - api_shortname: gke-multi-cloud +# name_pretty: Anthos Multicloud +# product_documentation: https://cloud.google.com/anthos/clusters/docs/multi-cloud +# api_description: enables you to provision and manage GKE clusters running on AWS +# and Azure infrastructure through a centralized Google Cloud backed control plane. +# api_id: gkemulticloud.googleapis.com +# GAPICs: +# - proto_path: google/cloud/gkemulticloud/v1 +# - api_shortname: gkehub +# name_pretty: GKE Hub API +# product_documentation: https://cloud.google.com/anthos/gke/docs/ +# api_description: provides a unified way to work with Kubernetes clusters as part +# of Anthos, extending GKE to work in multiple environments. You have consistent, +# unified, and secure infrastructure, cluster, and container management, whether +# you're using Anthos on Google Cloud (with traditional GKE), hybrid cloud, or multiple +# public clouds. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/gkehub/v1 +# - proto_path: google/cloud/gkehub/v1alpha +# - proto_path: google/cloud/gkehub/v1beta +# - proto_path: google/cloud/gkehub/v1beta1 +# - proto_path: google/cloud/gkehub/policycontroller/v1beta +# - proto_path: google/cloud/gkehub/servicemesh/v1beta +# - api_shortname: gkerecommender +# name_pretty: GKE Recommender API +# product_documentation: +# https://cloud.google.com/kubernetes-engine/docs/how-to/machine-learning/inference-quickstart +# api_description: lets you analyze the performance and cost-efficiency of your inference +# workloads, and make data-driven decisions about resource allocation and model +# deployment strategies. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-gkerecommender/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-gkerecommender +# api_id: gkerecommender.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/gkerecommender/v1 +# requires_billing: true +# - api_shortname: containeranalysis +# name_pretty: Grafeas +# product_documentation: https://grafeas.io +# api_description: n/a +# client_documentation: https://cloud.google.com/java/docs/reference/grafeas/latest/overview +# release_level: stable +# distribution_name: io.grafeas:grafeas +# codeowner_team: '@googleapis/aap-dpes' +# library_name: grafeas +# GAPICs: +# - proto_path: grafeas/v1 +# - api_shortname: gsuiteaddons +# name_pretty: Google Workspace Add-ons API +# product_documentation: https://developers.google.com/workspace/add-ons/overview +# api_description: are customized applications that integrate with Google Workspace +# productivity applications. +# library_name: gsuite-addons +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/gsuiteaddons/v1 +# - proto_path: google/apps/script/type +# - proto_path: google/apps/script/type/docs +# - proto_path: google/apps/script/type/drive +# - proto_path: google/apps/script/type/gmail +# - proto_path: google/apps/script/type/sheets +# - proto_path: google/apps/script/type/slides +# - api_shortname: hypercomputecluster +# name_pretty: Cluster Director API +# product_documentation: +# https://cloud.google.com/blog/products/compute/managed-slurm-and-other-cluster-director-enhancements +# api_description: simplifies cluster management across compute, network, and storage +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-hypercomputecluster/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-hypercomputecluster +# api_id: hypercomputecluster.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/hypercomputecluster/v1beta +# - proto_path: google/cloud/hypercomputecluster/v1 +# requires_billing: true +# - api_shortname: iam +# name_pretty: IAM +# product_documentation: n/a +# api_description: n/a +# release_level: stable +# distribution_name: com.google.cloud:google-iam-policy +# client_documentation: https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/history +# excluded_poms: proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1 +# excluded_dependencies: google-iam-policy +# GAPICs: +# - proto_path: google/iam/v1 +# - proto_path: google/iam/v1beta +# - proto_path: google/iam/v2 +# - proto_path: google/iam/v2beta +# - proto_path: google/iam/v3 +# - proto_path: google/iam/v3beta +# - api_shortname: iam-admin +# name_pretty: IAM Admin API +# product_documentation: https://cloud.google.com/iam/docs/apis +# api_description: you to manage your Service Accounts and IAM bindings. +# release_level: stable +# distribution_name: com.google.cloud:google-iam-admin +# api_id: iam.googleapis.com +# GAPICs: +# - proto_path: google/iam/admin/v1 +# - api_shortname: iamcredentials +# name_pretty: IAM Service Account Credentials API +# product_documentation: https://cloud.google.com/iam/credentials/reference/rest/ +# api_description: creates short-lived, limited-privilege credentials for IAM service +# accounts. +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/issues/new?component=187161&template=0 +# GAPICs: +# - proto_path: google/iam/credentials/v1 +# - api_shortname: iap +# name_pretty: Cloud Identity-Aware Proxy API +# product_documentation: https://cloud.google.com/iap +# api_description: Controls access to cloud applications running on Google Cloud Platform. +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-iap/latest/overview +# release_level: stable +# distribution_name: com.google.cloud:google-cloud-iap +# api_id: iap.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/iap/v1 +# requires_billing: true +# - api_shortname: ids +# name_pretty: Intrusion Detection System +# product_documentation: https://cloud.google.com/intrusion-detection-system/docs +# api_description: ' monitors your networks, and it alerts you when it detects malicious +# activity. Cloud IDS is powered by Palo Alto Networks.' +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/ids/v1 +# - api_shortname: infra-manager +# name_pretty: Infrastructure Manager API +# product_documentation: https://cloud.google.com/infrastructure-manager/docs/overview +# api_description: Creates and manages Google Cloud Platform resources and infrastructure. +# api_id: config.googleapis.com +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/config/v1 +# - api_shortname: cloudiot +# name_pretty: Cloud Internet of Things (IoT) Core +# product_documentation: https://cloud.google.com/iot +# api_description: is a complete set of tools to connect, process, store, and analyze +# data both at the edge and in the cloud. The platform consists of scalable, fully-managed +# cloud services; an integrated software stack for edge/on-premises computing with +# machine learning capabilities for all your IoT needs. +# library_name: iot +# release_level: stable +# issue_tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:310170 +# GAPICs: +# - proto_path: google/cloud/iot/v1 +# - api_shortname: merchantapi +# name_pretty: Merchant Issue Resolution API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programatically manage your Merchant Issues +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-issue-resolution/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-issue-resolution +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/issueresolution/v1 +# - proto_path: google/shopping/merchant/issueresolution/v1beta +# library_name: java-shopping-merchant-issue-resolution +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant Order Tracking API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center Accounts +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-order-tracking/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-order-tracking +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/ordertracking/v1 +# - proto_path: google/shopping/merchant/ordertracking/v1beta +# library_name: java-shopping-merchant-order-tracking +# requires_billing: true +# - api_shortname: cloudkms +# name_pretty: Cloud Key Management Service +# product_documentation: https://cloud.google.com/kms +# api_description: a cloud-hosted key management service that lets you manage cryptographic +# keys for your cloud services the same way you do on-premises. You can generate, +# use, rotate, and destroy AES256, RSA 2048, RSA 3072, RSA 4096, EC P256, and EC +# P384 cryptographic keys. Cloud KMS is integrated with Cloud IAM and Cloud Audit +# Logging so that you can manage permissions on individual keys and monitor how +# these are used. Use Cloud KMS to protect secrets and other sensitive data that +# you need to store in Google Cloud Platform. +# library_name: kms +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/5264932 +# GAPICs: +# - proto_path: google/cloud/kms/v1 +# - api_shortname: kmsinventory +# name_pretty: KMS Inventory API +# product_documentation: https://cloud.google.com/kms/docs/ +# api_description: KMS Inventory API. +# rest_documentation: https://cloud.google.com/kms/docs/reference/rest +# rpc_documentation: https://cloud.google.com/kms/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/kms/inventory/v1 +# - api_shortname: language +# name_pretty: Natural Language +# product_documentation: https://cloud.google.com/natural-language/docs/ +# api_description: provides natural language understanding technologies to developers, +# including sentiment analysis, entity analysis, entity sentiment analysis, content +# classification, and syntax analysis. This API is part of the larger Cloud Machine +# Learning API family. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559753 +# rest_documentation: https://cloud.google.com/natural-language/docs/reference/rest +# rpc_documentation: https://cloud.google.com/natural-language/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/language/v1 +# - proto_path: google/cloud/language/v1beta2 +# - proto_path: google/cloud/language/v2 +# - api_shortname: licensemanager +# name_pretty: License Manager API +# product_documentation: https://cloud.google.com/compute/docs/instances/windows/ms-licensing +# api_description: License Manager is a tool to manage and track third-party licenses +# on Google Cloud. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-licensemanager +# api_id: licensemanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/licensemanager/v1 +# requires_billing: true +# - api_shortname: lifesciences +# name_pretty: Cloud Life Sciences +# product_documentation: https://cloud.google.com/life-sciences/docs +# api_description: is a suite of services and tools for managing, processing, and +# transforming life sciences data. +# library_name: life-sciences +# rest_documentation: https://cloud.google.com/life-sciences/docs/reference/rest +# rpc_documentation: https://cloud.google.com/life-sciences/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/lifesciences/v2beta +# - api_shortname: locationfinder +# name_pretty: Cloud Location Finder API +# product_documentation: https://cloud.google.com/location-finder/docs/overview +# api_description: Cloud Location Finder is a public API that offers a repository +# of all Google Cloud and Google Distributed Cloud locations, as well as cloud locations +# for other cloud providers. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-locationfinder/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-locationfinder +# api_id: locationfinder.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/locationfinder/v1 +# requires_billing: true +# rpc_documentation: https://cloud.google.com/locationfinder/docs/reference/rest +# - api_shortname: logging +# name_pretty: Cloud Logging +# product_documentation: https://cloud.google.com/logging/docs +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-logging/latest/history +# issue_tracker: https://issuetracker.google.com/savedsearches/559764 +# release_level: stable +# language: java +# distribution_name: com.google.cloud:google-cloud-logging +# api_id: logging.googleapis.com +# transport: grpc +# library_type: GAPIC_COMBO +# api_description: allows you to store, search, analyze, monitor, and alert on log +# data and events from Google Cloud and Amazon Web Services. Using the BindPlane +# service, you can also collect this data from over 150 common application components, +# on-premises systems, and hybrid cloud systems. BindPlane is included with your +# Google Cloud project at no additional cost. +# codeowner_team: '@googleapis/cloud-sdk-java-team' +# recommended_package: com.google.cloud.logging +# GAPICs: +# - proto_path: google/logging/v2 +# - api_shortname: lustre +# name_pretty: Google Cloud Managed Lustre API +# product_documentation: https://cloud.google.com/managed-lustre/docs +# api_description: Google Cloud Managed Lustre delivers a high-performance, fully +# managed parallel file system optimized for AI and HPC applications. +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-lustre/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-lustre +# api_id: lustre.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/lustre/v1 +# requires_billing: true +# - api_shortname: maintenance +# name_pretty: Maintenance API +# product_documentation: https://cloud.google.com/unified-maintenance/docs/overview +# api_description: The Maintenance API provides a centralized view of planned disruptive +# maintenance events across supported Google Cloud products. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-maintenance/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-maintenance +# api_id: maintenance.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/maintenance/api/v1beta +# - proto_path: google/cloud/maintenance/api/v1 +# requires_billing: true +# rpc_documentation: https://cloud.google.com/unified-maintenance/docs/reference/rpc +# - api_shortname: managedidentities +# name_pretty: Managed Service for Microsoft Active Directory +# product_documentation: https://cloud.google.com/managed-microsoft-ad/ +# api_description: is a highly available, hardened Google Cloud service running actual +# Microsoft AD that enables you to manage authentication and authorization for your +# AD-dependent workloads, automate AD server maintenance and security configuration, +# and connect your on-premises AD domain to the cloud. +# library_name: managed-identities +# release_level: stable +# api_id: managedidentities.googleapis.com +# GAPICs: +# - proto_path: google/cloud/managedidentities/v1 +# - proto_path: google/cloud/managedidentities/v1beta1 +# - api_shortname: managedkafka +# name_pretty: Managed Service for Apache Kafka +# product_documentation: https://cloud.google.com/managed-kafka +# api_description: Manage Apache Kafka clusters and resources. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-managedkafka/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-managedkafka +# api_id: managedkafka.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/managedkafka/v1 +# requires_billing: true +# - api_shortname: maps-addressvalidation +# name_pretty: Address Validation API +# product_documentation: https://developers.google.com/maps/documentation/address-validation/ +# api_description: The Address Validation API allows developers to verify the accuracy +# of addresses. Given an address, it returns information about the correctness of +# the components of the parsed address, a geocode, and a verdict on the deliverability +# of the parsed address. +# api_id: addressvalidation.googleapis.com +# cloud_api: false +# distribution_name: com.google.maps:google-maps-addressvalidation +# GAPICs: +# - proto_path: google/maps/addressvalidation/v1 +# - api_shortname: maps-area-insights +# name_pretty: Places Insights API +# product_documentation: https://developers.google.com/maps/documentation/places-insights +# api_description: Places Insights API. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-maps-area-insights/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-area-insights +# api_id: maps-area-insights.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/areainsights/v1 +# requires_billing: true +# - api_shortname: maps-fleetengine +# name_pretty: Local Rides and Deliveries API +# product_documentation: +# https://developers.google.com/maps/documentation/transportation-logistics/mobility +# api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries +# and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the +# Cloud Logging Services is subject to the Google Maps Platform Terms of Service +# located at https://cloud.google.com/maps-platform/terms. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-fleetengine +# api_id: maps-fleetengine.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/fleetengine/v1 +# requires_billing: true +# - api_shortname: maps-fleetengine-delivery +# name_pretty: Last Mile Fleet Solution Delivery API +# product_documentation: +# https://developers.google.com/maps/documentation/transportation-logistics/mobility +# api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries +# and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the +# Cloud Logging Services is subject to the Google Maps Platform Terms of Service +# located at https://cloud.google.com/maps-platform/terms. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-maps-fleetengine-delivery/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-fleetengine-delivery +# api_id: maps-fleetengine-delivery.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/fleetengine/delivery/v1 +# requires_billing: true +# - api_shortname: geocode +# name_pretty: Geocoding API +# product_documentation: https://developers.google.com/maps/documentation/geocoding/overview +# api_description: The Geocoding API is a service that accepts a place as an address, +# latitude and longitude coordinates, or Place ID. +# client_documentation: https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-geocode +# api_id: geocode.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/geocode/v4 +# library_name: maps-geocode +# requires_billing: true +# - api_shortname: maps-mapsplatformdatasets +# name_pretty: Maps Platform Datasets API +# product_documentation: https://developers.google.com/maps/documentation +# api_description: "The Maps Platform Datasets API enables developers to ingest geospatially-tied +# datasets\n that they can use to enrich their experience of Maps Platform solutions +# (e.g. styling, routing)." +# api_id: mapsplatformdatasets.googleapis.com +# distribution_name: com.google.maps:google-maps-mapsplatformdatasets +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/mapsplatformdatasets/v1 +# - api_shortname: maps-places +# name_pretty: Places API (New) +# product_documentation: https://developers.google.com/maps/documentation/places/web-service/ +# api_description: The Places API allows developers to access a variety of search +# and retrieval endpoints for a Place. +# api_id: places.googleapis.com +# distribution_name: com.google.maps:google-maps-places +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/places/v1 +# - api_shortname: routeoptimization +# name_pretty: Route Optimization API +# product_documentation: https://developers.google.com/maps/documentation/route-optimization +# api_description: The Route Optimization API assigns tasks and routes to a vehicle +# fleet, optimizing against the objectives and constraints that you supply for your +# transportation goals. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-maps-routeoptimization/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-routeoptimization +# api_id: routeoptimization.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/routeoptimization/v1 +# library_name: maps-routeoptimization +# requires_billing: true +# rest_documentation: +# https://developers.google.com/maps/documentation/route-optimization/reference/rest/ +# rpc_documentation: +# https://developers.google.com/maps/documentation/route-optimization/reference/rpc +# - api_shortname: maps-routing +# name_pretty: Routes API +# product_documentation: https://developers.google.com/maps/documentation/routes +# api_description: Routes API is the next generation, performance optimized version +# of the existing Directions API and Distance Matrix API. It helps you find the +# ideal route from A to Z, calculates ETAs and distances for matrices of origin +# and destination locations, and also offers new features. +# release_level: stable +# api_id: routes.googleapis.com +# distribution_name: com.google.maps:google-maps-routing +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/routing/v2 +# - api_shortname: maps-solar +# name_pretty: Solar API +# product_documentation: https://developers.google.com/maps/documentation/solar/overview +# api_description: The Solar API allows users to read details about the solar potential +# of over 60 million buildings. This includes measurements of the building's roof +# (e.g., size and tilt/azimuth), energy production for a range of sizes of solar +# installations, and financial costs and benefits. +# client_documentation: https://cloud.google.com/java/docs/reference/google-maps-solar/latest/overview +# release_level: preview +# distribution_name: com.google.maps:google-maps-solar +# api_id: maps-solar.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.maps +# cloud_api: false +# GAPICs: +# - proto_path: google/maps/solar/v1 +# requires_billing: true +# rpc_documentation: https://developers.google.com/maps/documentation/solar/reference/rest +# - api_shortname: marketingplatformadminapi +# name_pretty: Google Marketing Platform Admin API +# product_documentation: https://developers.google.com/analytics/devguides/config/gmp/v1 +# api_description: The Google Marketing Platform Admin API allows for programmatic +# access to the Google Marketing Platform configuration data. You can use the Google +# Marketing Platform Admin API to manage links between your Google Marketing Platform +# organization and Google Analytics accounts, and to set the service level of your +# GA4 properties. +# client_documentation: https://cloud.google.com/java/docs/reference/admin/latest/overview +# release_level: preview +# distribution_name: com.google.ads-marketingplatform:admin +# api_id: marketingplatformadminapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.ads-marketingplatform +# cloud_api: false +# GAPICs: +# - proto_path: google/marketingplatform/admin/v1alpha +# requires_billing: true +# - api_shortname: mediatranslation +# name_pretty: Media Translation API +# product_documentation: https://cloud.google.com/ +# api_description: provides enterprise quality translation from/to various media types. +# requires_billing: false +# GAPICs: +# - proto_path: google/cloud/mediatranslation/v1beta1 +# - api_shortname: meet +# name_pretty: Google Meet API +# product_documentation: https://developers.google.com/meet/api/guides/overview +# api_description: The Google Meet REST API lets you create and manage meetings for +# Google Meet and offers entry points to your users directly from your app +# GAPICs: +# - proto_path: google/apps/meet/v2 +# - proto_path: google/apps/meet/v2beta +# - api_shortname: memcache +# name_pretty: Cloud Memcache +# product_documentation: https://cloud.google.com/memorystore/ +# api_description: is a fully-managed in-memory data store service for Memcache. +# release_level: stable +# requires_billing: false +# GAPICs: +# - proto_path: google/cloud/memcache/v1 +# - proto_path: google/cloud/memcache/v1beta2 +# - api_shortname: migrationcenter +# name_pretty: Migration Center API +# product_documentation: https://cloud.google.com/migration-center/docs/migration-center-overview +# api_description: Google Cloud Migration Center is a unified platform that helps +# you accelerate your end-to-end cloud journey from your current on-premises or +# cloud environments to Google Cloud +# GAPICs: +# - proto_path: google/cloud/migrationcenter/v1 +# - api_shortname: modelarmor +# name_pretty: Model Armor API +# product_documentation: https://cloud.google.com/security-command-center/docs/model-armor-overview +# api_description: Model Armor helps you protect against risks like prompt injection, +# harmful content, and data leakage in generative AI applications by letting you +# define policies that filter user prompts and model responses. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-modelarmor +# api_id: modelarmor.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/modelarmor/v1 +# - proto_path: google/cloud/modelarmor/v1beta +# requires_billing: true +# - api_shortname: monitoring +# name_pretty: Stackdriver Monitoring +# product_documentation: https://cloud.google.com/monitoring/docs +# api_description: collects metrics, events, and metadata from Google Cloud, Amazon +# Web Services (AWS), hosted uptime probes, and application instrumentation. Using +# the BindPlane service, you can also collect this data from over 150 common application +# components, on-premise systems, and hybrid cloud systems. Stackdriver ingests +# that data and generates insights via dashboards, charts, and alerts. BindPlane +# is included with your Google Cloud project at no additional cost. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559785 +# GAPICs: +# - proto_path: google/monitoring/v3 +# - api_shortname: monitoring-dashboards +# name_pretty: Monitoring Dashboards +# product_documentation: https://cloud.google.com/monitoring/charts/dashboards +# api_description: are one way for you to view and analyze metric data. The Cloud +# Console provides predefined dashboards that require no setup or configuration. +# You can also define custom dashboards. With custom dashboards, you have complete +# control over the charts that are displayed and their configuration. +# release_level: stable +# distribution_name: com.google.cloud:google-cloud-monitoring-dashboard +# api_id: monitoring.googleapis.com +# GAPICs: +# - proto_path: google/monitoring/dashboard/v1 +# - api_shortname: monitoring-metricsscope +# name_pretty: Monitoring Metrics Scopes +# product_documentation: +# https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes +# api_description: The metrics scope defines the set of Google Cloud projects whose +# metrics the current Google Cloud project can access. +# api_id: monitoring.googleapis.com +# distribution_name: com.google.cloud:google-cloud-monitoring-metricsscope +# GAPICs: +# - proto_path: google/monitoring/metricsscope/v1 +# - api_shortname: netapp +# name_pretty: NetApp API +# product_documentation: https://cloud.google.com/netapp/volumes/docs/discover/overview +# api_description: Google Cloud NetApp Volumes is a fully-managed, cloud-based data +# storage service that provides advanced data management capabilities and highly +# scalable performance with global availability. +# GAPICs: +# - proto_path: google/cloud/netapp/v1 +# - api_shortname: networkmanagement +# name_pretty: Network Management API +# product_documentation: +# https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/ +# api_description: provides a collection of network performance monitoring and diagnostic +# capabilities. +# library_name: network-management +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/networkmanagement/v1 +# - proto_path: google/cloud/networkmanagement/v1beta1 +# - api_shortname: networksecurity +# name_pretty: Network Security API +# product_documentation: https://cloud.google.com/traffic-director/docs/reference/network-security/rest +# api_description: n/a +# library_name: network-security +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/networksecurity/v1 +# - proto_path: google/cloud/networksecurity/v1beta1 +# - api_shortname: networkconnectivity +# name_pretty: Network Connectivity Center +# product_documentation: https://cloud.google.com/network-connectivity/docs +# api_description: Google's suite of products that provide enterprise connectivity +# from your on-premises network or from another cloud provider to your Virtual Private +# Cloud (VPC) network +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/networkconnectivity/v1 +# - proto_path: google/cloud/networkconnectivity/v1alpha1 +# - proto_path: google/cloud/networkconnectivity/v1beta +# - api_shortname: networkservices +# name_pretty: Network Services API +# product_documentation: https://cloud.google.com/products/networking +# api_description: Google Cloud offers a broad portfolio of networking services built +# on top of planet-scale infrastructure that leverages automation, advanced AI, +# and programmability, enabling enterprises to connect, scale, secure, modernize +# and optimize their infrastructure. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-networkservices +# api_id: networkservices.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/networkservices/v1 +# requires_billing: true +# - api_shortname: notebooks +# name_pretty: AI Platform Notebooks +# product_documentation: https://cloud.google.com/ai-platform-notebooks +# api_description: is a managed service that offers an integrated and secure JupyterLab +# environment for data scientists and machine learning developers to experiment, +# develop, and deploy models into production. Users can create instances running +# JupyterLab that come pre-installed with the latest data science and machine learning +# frameworks in a single click. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/notebooks/v1 +# - proto_path: google/cloud/notebooks/v1beta1 +# - proto_path: google/cloud/notebooks/v2 +# - api_shortname: cloudoptimization +# name_pretty: Cloud Fleet Routing +# product_documentation: https://cloud.google.com/optimization/docs +# api_description: is a managed routing service that takes your list of orders, vehicles, +# constraints, and objectives and returns the most efficient plan for your entire +# fleet in near real-time. +# library_name: optimization +# release_level: stable +# rest_documentation: https://cloud.google.com/optimization/docs/reference/rest +# rpc_documentation: https://cloud.google.com/optimization/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/optimization/v1 +# - api_shortname: oracledatabase +# name_pretty: Oracle Database@Google Cloud API +# product_documentation: https://cloud.google.com/oracle/database/docs +# api_description: The Oracle Database@Google Cloud API provides a set of APIs to +# manage Oracle database services, such as Exadata and Autonomous Databases. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-oracledatabase/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-oracledatabase +# api_id: oracledatabase.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/oracledatabase/v1 +# requires_billing: true +# - api_shortname: orchestration-airflow +# name_pretty: Cloud Composer +# product_documentation: https://cloud.google.com/composer/docs +# api_description: is a managed Apache Airflow service that helps you create, schedule, +# monitor and manage workflows. Cloud Composer automation helps you create Airflow +# environments quickly and use Airflow-native tools, such as the powerful Airflow +# web interface and command line tools, so you can focus on your workflows and not +# your infrastructure. +# release_level: stable +# api_id: composer.googleapis.com +# rest_documentation: https://cloud.google.com/composer/docs/reference/rest +# rpc_documentation: https://cloud.google.com/composer/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/orchestration/airflow/service/v1 +# - proto_path: google/cloud/orchestration/airflow/service/v1beta1 +# - api_shortname: orgpolicy +# name_pretty: Cloud Organization Policy +# product_documentation: n/a +# api_description: n/a +# release_level: stable +# client_documentation: +# https://cloud.google.com/java/docs/reference/proto-google-cloud-orgpolicy-v1/latest/overview +# GAPICs: +# - proto_path: google/cloud/orgpolicy/v1 +# - proto_path: google/cloud/orgpolicy/v2 +# - api_shortname: osconfig +# name_pretty: OS Config API +# product_documentation: https://cloud.google.com/compute/docs/os-patch-management +# api_description: provides OS management tools that can be used for patch management, +# patch compliance, and configuration management on VM instances. +# library_name: os-config +# release_level: stable +# requires_billing: false +# api_id: osconfig.googleapis.com +# GAPICs: +# - proto_path: google/cloud/osconfig/v1 +# - proto_path: google/cloud/osconfig/v1alpha +# - proto_path: google/cloud/osconfig/v1beta +# - api_shortname: oslogin +# name_pretty: Cloud OS Login +# product_documentation: https://cloud.google.com/compute/docs/oslogin/ +# api_description: manages OS login configuration for Directory API users. +# library_name: os-login +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559755 +# GAPICs: +# - proto_path: google/cloud/oslogin/v1 +# - proto_path: google/cloud/oslogin/v1beta +# - api_shortname: parallelstore +# name_pretty: Parallelstore API +# product_documentation: https://cloud/parallelstore?hl=en +# api_description: 'Parallelstore is based on Intel DAOS and delivers up to 6.3x greater +# read throughput performance compared to competitive Lustre scratch offerings. ' +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-parallelstore/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-parallelstore +# api_id: parallelstore.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/parallelstore/v1beta +# - proto_path: google/cloud/parallelstore/v1 +# requires_billing: true +# - api_shortname: parametermanager +# name_pretty: Parameter Manager API +# product_documentation: https://cloud.google.com/secret-manager/parameter-manager/docs/overview +# api_description: (Public Preview) Parameter Manager is a single source of truth +# to store, access and manage the lifecycle of your workload parameters. Parameter Manager +# aims to make management of sensitive application parameters effortless for +# customers without diminishing focus on security. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-parametermanager/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-parametermanager +# api_id: parametermanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/parametermanager/v1 +# requires_billing: true +# - api_shortname: phishingprotection +# name_pretty: Phishing Protection +# product_documentation: https://cloud.google.com/phishing-protection/docs/ +# api_description: helps prevent users from accessing phishing sites by identifying +# various signals associated with malicious content, including the use of your brand +# assets, classifying malicious content that uses your brand and reporting the unsafe +# URLs to Google Safe Browsing. Once a site is propagated to Safe Browsing, users +# will see warnings across more than 4 billion devices. +# issue_tracker: '' +# requires_billing: false +# GAPICs: +# - proto_path: google/cloud/phishingprotection/v1beta1 +# - api_shortname: policytroubleshooter +# name_pretty: IAM Policy Troubleshooter API +# product_documentation: https://cloud.google.com/iam/docs/troubleshooting-access +# api_description: makes it easier to understand why a user has access to a resource +# or doesn't have permission to call an API. Given an email, resource, and permission, +# Policy Troubleshooter examines all Identity and Access Management (IAM) policies +# that apply to the resource. It then reveals whether the member's roles include +# the permission on that resource and, if so, which policies bind the member to +# those roles. +# library_name: policy-troubleshooter +# release_level: stable +# api_id: policytroubleshooter.googleapis.com +# GAPICs: +# - proto_path: google/cloud/policytroubleshooter/v1 +# - proto_path: google/cloud/policytroubleshooter/iam/v3 +# - api_shortname: policysimulator +# name_pretty: Policy Simulator API +# product_documentation: https://cloud.google.com/policysimulator/docs/overview +# api_description: Policy Simulator is a collection of endpoints for creating, running, +# and viewing a Replay. +# GAPICs: +# - proto_path: google/cloud/policysimulator/v1 +# - api_shortname: cloudprivatecatalog +# name_pretty: Private Catalog +# product_documentation: https://cloud.google.com/private-catalog/docs +# api_description: allows developers and cloud admins to make their solutions discoverable +# to their internal enterprise users. Cloud admins can manage their solutions and +# ensure their users are always launching the latest versions. +# library_name: private-catalog +# api_id: privatecatalog.googleapis.com +# GAPICs: +# - proto_path: google/cloud/privatecatalog/v1beta1 +# - api_shortname: privilegedaccessmanager +# name_pretty: Privileged Access Manager API +# product_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview +# api_description: Privileged Access Manager (PAM) helps you on your journey towards +# least privilege and helps mitigate risks tied to privileged access misuse orabuse. +# PAM allows you to shift from always-on standing privileges towards on-demand access +# with just-in-time, time-bound, and approval-based access elevations. PAM allows +# IAM administrators to create entitlements that can grant just-in-time, temporary +# access to any resource scope. Requesters can explore eligible entitlements and +# request the access needed for their task. Approvers are notified when approvals +# await their decision. Streamlined workflows facilitated by using PAM can support +# various use cases, including emergency access for incident responders, time-boxed +# access for developers for critical deployment or maintenance, temporary access +# for operators for data ingestion and audits, JIT access to service accounts for +# automated tasks, and more. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-privilegedaccessmanager +# api_id: privilegedaccessmanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/privilegedaccessmanager/v1 +# requires_billing: true +# rpc_documentation: https://cloud.google.com/iam/docs/reference/pam/rpc +# - api_shortname: cloudprofiler +# name_pretty: Cloud Profiler +# product_documentation: https://cloud.google.com/profiler/docs +# api_description: is a statistical, low-overhead profiler that continuously gathers +# CPU usage and memory-allocation information from your production applications. +# It attributes that information to the application's source code, helping you identify +# the parts of the application consuming the most resources, and otherwise illuminating +# the performance characteristics of the code. +# library_name: profiler +# release_level: stable +# api_id: cloudprofiler.googleapis.com +# GAPICs: +# - proto_path: google/devtools/cloudprofiler/v2 +# - api_shortname: publicca +# name_pretty: Public Certificate Authority API +# product_documentation: https://cloud.google.com/certificate-manager/docs/public-ca +# api_description: The Public Certificate Authority API may be used to create and +# manage ACME external account binding keys associated with Google Trust Services' +# publicly trusted certificate authority. +# rpc_documentation: https://cloud.google.com/certificate-manager/docs/reference/public-ca/rpc +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/security/publicca/v1beta1 +# - proto_path: google/cloud/security/publicca/v1 +# - api_shortname: rapidmigrationassessment +# name_pretty: Rapid Migration Assessment API +# product_documentation: https://cloud.google.com/migration-center/docs +# api_description: Rapid Migration Assessment API +# GAPICs: +# - proto_path: google/cloud/rapidmigrationassessment/v1 +# - api_shortname: recaptchaenterprise +# name_pretty: reCAPTCHA Enterprise +# product_documentation: https://cloud.google.com/recaptcha-enterprise/docs/ +# api_description: is a service that protects your site from spam and abuse. +# release_level: stable +# issue_tracker: '' +# requires_billing: false +# rest_documentation: https://cloud.google.com/recaptcha-enterprise/docs/reference/rest +# rpc_documentation: https://cloud.google.com/recaptcha-enterprise/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/recaptchaenterprise/v1 +# - proto_path: google/cloud/recaptchaenterprise/v1beta1 +# - api_shortname: recommendationengine +# name_pretty: Recommendations AI +# product_documentation: https://cloud.google.com/recommendations-ai/ +# api_description: delivers highly personalized product recommendations at scale. +# library_name: recommendations-ai +# GAPICs: +# - proto_path: google/cloud/recommendationengine/v1beta1 +# - api_shortname: recommender +# name_pretty: Recommender +# product_documentation: https://cloud.google.com/recommendations/ +# api_description: delivers highly personalized product recommendations at scale. +# release_level: stable +# issue_tracker: '' +# GAPICs: +# - proto_path: google/cloud/recommender/v1 +# - proto_path: google/cloud/recommender/v1beta1 +# - api_shortname: redis +# name_pretty: Cloud Redis +# product_documentation: https://cloud.google.com/memorystore/docs/redis/ +# api_description: is a fully managed Redis service for the Google Cloud. Applications +# running on Google Cloud can achieve extreme performance by leveraging the highly +# scalable, available, secure Redis service without the burden of managing complex +# Redis deployments. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/5169231 +# GAPICs: +# - proto_path: google/cloud/redis/v1 +# - proto_path: google/cloud/redis/v1beta1 +# - api_shortname: redis-cluster +# name_pretty: Google Cloud Memorystore for Redis API +# product_documentation: https://cloud.google.com/memorystore/docs/cluster +# api_description: Creates and manages Redis instances on the Google Cloud Platform. +# GAPICs: +# - proto_path: google/cloud/redis/cluster/v1 +# - proto_path: google/cloud/redis/cluster/v1beta1 +# - api_shortname: cloudresourcemanager +# name_pretty: Resource Manager API +# product_documentation: https://cloud.google.com/resource-manager +# api_description: enables you to programmatically manage resources by project, folder, +# and organization. +# library_name: resourcemanager +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/559757 +# GAPICs: +# - proto_path: google/cloud/resourcemanager/v3 +# - api_shortname: retail +# name_pretty: Cloud Retail +# product_documentation: https://cloud.google.com/solutions/retail +# api_description: Retail solutions API. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/retail/v2 +# - proto_path: google/cloud/retail/v2alpha +# - proto_path: google/cloud/retail/v2beta +# - api_shortname: run +# name_pretty: Cloud Run +# product_documentation: https://cloud.google.com/run/docs +# api_description: is a managed compute platform that enables you to run containers +# that are invocable via requests or events. +# rest_documentation: https://cloud.google.com/run/docs/reference/rest +# rpc_documentation: https://cloud.google.com/run/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/run/v2 +# - api_shortname: saasservicemgmt +# name_pretty: SaaS Runtime API +# product_documentation: https://cloud.google.com/saas-runtime/docs/overview +# api_description: "Model, deploy, and operate your SaaS at scale.\t" +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-saasservicemgmt/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-saasservicemgmt +# api_id: saasservicemgmt.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/saasplatform/saasservicemgmt/v1beta1 +# requires_billing: true +# rpc_documentation: https://cloud.google.com/saas-runtime/docs/apis +# - api_shortname: cloudscheduler +# name_pretty: Google Cloud Scheduler +# product_documentation: https://cloud.google.com/scheduler/docs +# api_description: lets you set up scheduled units of work to be executed at defined +# times or regular intervals. These work units are commonly known as cron jobs. +# Typical use cases might include sending out a report email on a daily basis, updating +# some cached data every 10 minutes, or updating some summary information once an +# hour. +# library_name: scheduler +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/5411429 +# rest_documentation: https://cloud.google.com/scheduler/docs/reference/rest +# rpc_documentation: https://cloud.google.com/scheduler/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/scheduler/v1 +# - proto_path: google/cloud/scheduler/v1beta1 +# - api_shortname: secretmanager +# name_pretty: Secret Management +# product_documentation: https://cloud.google.com/solutions/secrets-management/ +# api_description: allows you to encrypt, store, manage, and audit infrastructure +# and application-level secrets. +# release_level: stable +# requires_billing: false +# GAPICs: +# - proto_path: google/cloud/secretmanager/v1 +# - proto_path: google/cloud/secretmanager/v1beta2 +# - proto_path: google/cloud/secrets/v1beta1 +# - api_shortname: securesourcemanager +# name_pretty: Secure Source Manager API +# product_documentation: https://cloud.google.com/secure-source-manager/docs/overview +# api_description: "Regionally deployed, single-tenant managed source code repository +# hosted on\n Google Cloud." +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/securesourcemanager/v1 +# - api_shortname: privateca +# name_pretty: Certificate Authority Service +# product_documentation: https://cloud.google.com/certificate-authority-service/docs +# api_description: simplifies the deployment and management of private CAs without +# managing infrastructure. +# library_name: security-private-ca +# release_level: stable +# api_id: privateca.googleapis.com +# rest_documentation: https://cloud.google.com/certificate-authority-service/docs/reference/rest +# rpc_documentation: https://cloud.google.com/certificate-authority-service/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/security/privateca/v1 +# - proto_path: google/cloud/security/privateca/v1beta1 +# - api_shortname: securitycenter +# name_pretty: Security Command Center +# product_documentation: https://cloud.google.com/security-command-center +# api_description: makes it easier for you to prevent, detect, and respond to threats. +# Identify security misconfigurations in virtual machines, networks, applications, +# and storage buckets from a centralized dashboard. Take action on them before they +# can potentially result in business damage or loss. Built-in capabilities can quickly +# surface suspicious activity in your Stackdriver security logs or indicate compromised +# virtual machines. Respond to threats by following actionable recommendations or +# exporting logs to your SIEM for further investigation. +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/559748 +# rest_documentation: https://cloud.google.com/security-command-center/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/securitycenter/v1 +# - proto_path: google/cloud/securitycenter/v1beta1 +# - proto_path: google/cloud/securitycenter/v1p1beta1 +# - proto_path: google/cloud/securitycenter/v2 +# - api_shortname: securitycenter +# name_pretty: Security Command Center Settings API +# product_documentation: https://cloud.google.com/security-command-center/ +# api_description: is the canonical security and data risk database for Google Cloud. +# Security Command Center enables you to understand your security and data attack +# surface by providing asset inventory, discovery, search, and management. +# library_name: securitycenter-settings +# api_id: securitycenter-settings.googleapis.com +# requires_billing: false +# rest_documentation: https://cloud.google.com/security-command-center/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/securitycenter/settings/v1beta1 +# - api_shortname: securitycentermanagement +# name_pretty: Security Center Management API +# product_documentation: https://cloud.google.com/securitycentermanagement/docs/overview +# api_description: Security Center Management API +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/securitycentermanagement/v1 +# - api_shortname: securityposture +# name_pretty: Security Posture API +# product_documentation: https://cloud.google.com/security-command-center/docs/security-posture-overview +# api_description: Security Posture is a comprehensive framework of policy sets that +# empowers organizations to define, assess early, deploy, and monitor their security +# measures in a unified way and helps simplify governance and reduces administrative +# toil. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/securityposture/v1 +# - api_shortname: servicecontrol +# name_pretty: Service Control API +# product_documentation: https://cloud.google.com/service-infrastructure/docs/overview/ +# api_description: ' is a foundational platform for creating, managing, securing, +# and consuming APIs and services across organizations. It is used by Google APIs, +# Cloud APIs, Cloud Endpoints, and API Gateway.' +# library_name: service-control +# release_level: stable +# GAPICs: +# - proto_path: google/api/servicecontrol/v1 +# - proto_path: google/api/servicecontrol/v2 +# - api_shortname: servicemanagement +# name_pretty: Service Management API +# product_documentation: https://cloud.google.com/service-infrastructure/docs/overview/ +# api_description: is a foundational platform for creating, managing, securing, and +# consuming APIs and services across organizations. It is used by Google APIs, Cloud +# APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide +# range of features to service consumers and service producers, including authentication, +# authorization, auditing, rate limiting, analytics, billing, logging, and monitoring. +# library_name: service-management +# release_level: stable +# api_id: servicemanagement.googleapis.com +# GAPICs: +# - proto_path: google/api/servicemanagement/v1 +# - api_shortname: serviceusage +# name_pretty: Service Usage +# product_documentation: https://cloud.google.com/service-usage/docs/overview +# api_description: is an infrastructure service of Google Cloud that lets you list +# and manage other APIs and services in your Cloud projects. +# library_name: service-usage +# release_level: stable +# GAPICs: +# - proto_path: google/api/serviceusage/v1 +# - proto_path: google/api/serviceusage/v1beta1 +# - api_shortname: servicedirectory +# name_pretty: Service Directory +# product_documentation: https://cloud.google.com/service-directory/ +# api_description: allows the registration and lookup of service endpoints. +# release_level: stable +# requires_billing: false +# rest_documentation: https://cloud.google.com/service-directory/docs/reference/rest +# rpc_documentation: https://cloud.google.com/service-directory/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/servicedirectory/v1 +# - proto_path: google/cloud/servicedirectory/v1beta1 +# - api_shortname: servicehealth +# name_pretty: Service Health API +# product_documentation: https://cloud.google.com/service-health/docs/overview +# api_description: Personalized Service Health helps you gain visibility into disruptive +# events impacting Google Cloud products. +# rpc_documentation: https://cloud.google.com/service-health/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/servicehealth/v1 +# - api_shortname: cloudshell +# name_pretty: Cloud Shell +# product_documentation: https://cloud.google.com/shell/docs +# api_description: is an interactive shell environment for Google Cloud that makes +# it easy for you to learn and experiment with Google Cloud and manage your projects +# and resources from your web browser. +# library_name: shell +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/shell/docs/reference/rest +# rpc_documentation: https://cloud.google.com/shell/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/shell/v1 +# - api_shortname: css +# name_pretty: CSS API +# product_documentation: https://developers.google.com/comparison-shopping-services/api +# api_description: The CSS API is used to manage your CSS and control your CSS Products +# portfolio +# library_name: shopping-css +# cloud_api: false +# distribution_name: com.google.shopping:google-shopping-css +# GAPICs: +# - proto_path: google/shopping/css/v1 +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-accounts +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/accounts/v1 +# - proto_path: google/shopping/merchant/accounts/v1beta +# library_name: shopping-merchant-accounts +# requires_billing: true +# - api_shortname: shopping-merchant-conversions +# name_pretty: Merchant Conversions API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-conversions/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-conversions +# api_id: shopping-merchant-conversions.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/conversions/v1 +# - proto_path: google/shopping/merchant/conversions/v1beta +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-datasources +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/datasources/v1 +# - proto_path: google/shopping/merchant/datasources/v1beta +# library_name: shopping-merchant-datasources +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# library_name: shopping-merchant-inventories +# cloud_api: false +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-inventories +# GAPICs: +# - proto_path: google/shopping/merchant/inventories/v1 +# - proto_path: google/shopping/merchant/inventories/v1beta +# - api_shortname: shopping-merchant-lfp +# name_pretty: Merchant LFP API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-lfp/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-lfp +# api_id: shopping-merchant-lfp.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/lfp/v1 +# - proto_path: google/shopping/merchant/lfp/v1beta +# requires_billing: true +# - api_shortname: shopping-merchant-notifications +# name_pretty: Merchant Notifications API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-notifications/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-notifications +# api_id: shopping-merchant-notifications.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/notifications/v1 +# - proto_path: google/shopping/merchant/notifications/v1beta +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your products. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-productstudio/latest/overview +# release_level: preview +# distribution_name: com.google.shopping:google-shopping-merchant-productstudio +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/productstudio/v1alpha +# library_name: shopping-merchant-product-studio +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-products +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/products/v1 +# - proto_path: google/shopping/merchant/products/v1beta +# library_name: shopping-merchant-products +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-promotions +# api_id: merchantapi.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/promotions/v1 +# - proto_path: google/shopping/merchant/promotions/v1beta +# library_name: shopping-merchant-promotions +# requires_billing: true +# - api_shortname: shopping-merchant-quota +# name_pretty: Merchant Quota API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-quota/latest/overview +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-quota +# api_id: shopping-merchant-quota.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/quota/v1 +# - proto_path: google/shopping/merchant/quota/v1beta +# requires_billing: true +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center accounts. +# library_name: shopping-merchant-reports +# cloud_api: false +# release_level: stable +# distribution_name: com.google.shopping:google-shopping-merchant-reports +# GAPICs: +# - proto_path: google/shopping/merchant/reports/v1 +# - proto_path: google/shopping/merchant/reports/v1beta +# - proto_path: google/shopping/merchant/reports/v1alpha +# - api_shortname: merchantapi +# name_pretty: Merchant API +# product_documentation: https://developers.google.com/merchant/api +# api_description: Programmatically manage your Merchant Center Accounts. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-shopping-merchant-reviews/latest/overview +# release_level: preview +# distribution_name: com.google.shopping:google-shopping-merchant-reviews +# library_type: GAPIC_AUTO +# group_id: com.google.shopping +# cloud_api: false +# GAPICs: +# - proto_path: google/shopping/merchant/reviews/v1beta +# requires_billing: true +# library_name: shopping-merchant-reviews +# - api_shortname: spanner +# name_pretty: Cloud Spanner +# product_documentation: https://cloud.google.com/spanner/docs/ +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history +# api_description: is a fully managed, mission-critical, relational database service +# that offers transactional consistency at global scale, schemas, SQL (ANSI 2011 +# with extensions), and automatic, synchronous replication for high availability. +# Be sure to activate the Cloud Spanner API on the Developer's Console to use Cloud +# Spanner from your project. +# issue_tracker: https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open +# release_level: stable +# language: java +# min_java_version: 8 +# distribution_name: com.google.cloud:google-cloud-spanner +# api_id: spanner.googleapis.com +# transport: grpc +# requires_billing: true +# codeowner_team: '@googleapis/spanner-team' +# library_type: GAPIC_COMBO +# excluded_poms: google-cloud-spanner-bom,google-cloud-spanner +# recommended_package: com.google.cloud.spanner +# GAPICs: +# - proto_path: google/spanner/admin/database/v1 +# - proto_path: google/spanner/admin/instance/v1 +# - proto_path: google/spanner/executor/v1 +# - proto_path: google/spanner/v1 +# - api_shortname: spanneradapter +# name_pretty: Cloud Spanner Adapter API +# product_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview +# api_description: The Cloud Spanner Adapter service allows native drivers of supported database +# dialects to interact directly with Cloud Spanner by wrapping the underlying wire +# protocol used by the driver in a gRPC stream. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-spanneradapter +# api_id: spanneradapter.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/spanner/adapter/v1 +# requires_billing: true +# - api_shortname: speech +# name_pretty: Cloud Speech +# product_documentation: https://cloud.google.com/speech-to-text/docs/ +# api_description: enables easy integration of Google speech recognition technologies +# into developer applications. Send audio and receive a text transcription from +# the Speech-to-Text API service. +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/559758 +# rest_documentation: https://cloud.google.com/speech-to-text/docs/reference/rest +# rpc_documentation: https://cloud.google.com/speech-to-text/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/speech/v1 +# - proto_path: google/cloud/speech/v1p1beta1 +# - proto_path: google/cloud/speech/v2 +# - api_shortname: storage +# name_pretty: Cloud Storage +# product_documentation: https://cloud.google.com/storage +# client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/history +# api_description: 'is a durable and highly available object storage service. Google +# Cloud Storage is almost infinitely scalable and guarantees consistency: when a +# write succeeds, the latest copy of the object will be returned to any GET, globally.' +# issue_tracker: https://issuetracker.google.com/savedsearches/559782 +# release_level: stable +# language: java +# distribution_name: com.google.cloud:google-cloud-storage +# codeowner_team: '@googleapis/gcs-team' +# api_id: storage.googleapis.com +# requires_billing: true +# library_type: GAPIC_COMBO +# extra_versioned_modules: gapic-google-cloud-storage-v2 +# excluded_poms: google-cloud-storage-bom,google-cloud-storage +# recommended_package: com.google.cloud.storage +# transport: rest +# GAPICs: +# - proto_path: google/storage/v2 +# - proto_path: google/storage/control/v2 +# - api_shortname: storagetransfer +# name_pretty: Storage Transfer Service +# product_documentation: https://cloud.google.com/storage-transfer-service +# api_description: Secure, low-cost services for transferring data from cloud or on-premises +# sources. +# library_name: storage-transfer +# release_level: stable +# GAPICs: +# - proto_path: google/storagetransfer/v1 +# - api_shortname: storagebatchoperations +# name_pretty: Storage Batch Operations API +# product_documentation: https://cloud.google.com/storage/docs/batch-operations/overview +# api_description: Storage batch operations is a Cloud Storage management feature +# that performs operations on billions of Cloud Storage objects in a serverless +# manner. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-storagebatchoperations/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-storagebatchoperations +# api_id: storagebatchoperations.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/storagebatchoperations/v1 +# requires_billing: true +# - api_shortname: storageinsights +# name_pretty: Storage Insights API +# product_documentation: https://cloud.google.com/storage/docs/insights/storage-insights/ +# api_description: Provides insights capability on Google Cloud Storage +# GAPICs: +# - proto_path: google/cloud/storageinsights/v1 +# - api_shortname: jobs +# name_pretty: Talent Solution +# product_documentation: https://cloud.google.com/solutions/talent-solution/ +# api_description: allows you to transform your job search and candidate matching +# capabilities with Cloud Talent Solution, designed to support enterprise talent +# acquisition technology and evolve with your growing needs. This AI solution includes +# features such as Job Search and Profile Search (Beta) to provide candidates and +# employers with an enhanced talent acquisition experience. Learn more about Cloud +# Talent Solution from the product overview page. +# library_name: talent +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/559664 +# GAPICs: +# - proto_path: google/cloud/talent/v4 +# - proto_path: google/cloud/talent/v4beta1 +# - api_shortname: cloudtasks +# name_pretty: Cloud Tasks +# product_documentation: https://cloud.google.com/tasks/docs/ +# api_description: a fully managed service that allows you to manage the execution, +# dispatch and delivery of a large number of distributed tasks. You can asynchronously +# perform work outside of a user request. Your tasks can be executed on App Engine +# or any arbitrary HTTP endpoint. +# library_name: tasks +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# issue_tracker: https://issuetracker.google.com/savedsearches/5433985 +# rest_documentation: https://cloud.google.com/tasks/docs/reference/rest +# rpc_documentation: https://cloud.google.com/tasks/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/tasks/v2 +# - proto_path: google/cloud/tasks/v2beta2 +# - proto_path: google/cloud/tasks/v2beta3 +# - api_shortname: telcoautomation +# name_pretty: Telco Automation API +# product_documentation: https://cloud.google.com/telecom-network-automation +# api_description: APIs to automate 5G deployment and management of cloud infrastructure +# and network functions. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/telcoautomation/v1 +# - proto_path: google/cloud/telcoautomation/v1alpha1 +# - api_shortname: texttospeech +# name_pretty: Cloud Text-to-Speech +# product_documentation: https://cloud.google.com/text-to-speech +# api_description: enables easy integration of Google text recognition technologies +# into developer applications. Send text and receive synthesized audio output from +# the Cloud Text-to-Speech API service. +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/5235428 +# rest_documentation: https://cloud.google.com/text-to-speech/docs/reference/rest +# rpc_documentation: https://cloud.google.com/text-to-speech/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/texttospeech/v1 +# - proto_path: google/cloud/texttospeech/v1beta1 +# - api_shortname: tpu +# name_pretty: Cloud TPU +# product_documentation: https://cloud.google.com/tpu/docs +# api_description: are Google's custom-developed application-specific integrated circuits +# (ASICs) used to accelerate machine learning workloads. +# release_level: stable +# rest_documentation: https://cloud.google.com/tpu/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/tpu/v1 +# - proto_path: google/cloud/tpu/v2 +# - proto_path: google/cloud/tpu/v2alpha1 +# - api_shortname: cloudtrace +# name_pretty: Stackdriver Trace +# product_documentation: https://cloud.google.com/trace/docs/ +# api_description: is a distributed tracing system that collects latency data from +# your applications and displays it in the Google Cloud Platform Console. You can +# track how requests propagate through your application and receive detailed near +# real-time performance insights. +# library_name: trace +# release_level: stable +# requires_billing: false +# GAPICs: +# - proto_path: google/devtools/cloudtrace/v1 +# - proto_path: google/devtools/cloudtrace/v2 +# - api_shortname: translate +# name_pretty: Cloud Translation +# product_documentation: https://cloud.google.com/translate/docs/ +# api_description: can dynamically translate text between thousands of language pairs. +# Translation lets websites and programs programmatically integrate with the translation +# service. +# release_level: stable +# api_id: translate.googleapis.com +# issue_tracker: https://issuetracker.google.com/savedsearches/559749 +# rest_documentation: https://cloud.google.com/translate/docs/reference/rest +# rpc_documentation: https://cloud.google.com/translate/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/translate/v3 +# - proto_path: google/cloud/translate/v3beta1 +# - api_shortname: memorystore +# name_pretty: Memorystore API +# product_documentation: https://cloud.google.com/memorystore/docs/valkey +# api_description: Memorystore for Valkey is a fully managed Valkey Cluster service +# for Google Cloud. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-memorystore/latest/overview +# release_level: stable +# api_id: memorystore.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# library_name: valkey +# GAPICs: +# - proto_path: google/cloud/memorystore/v1 +# - proto_path: google/cloud/memorystore/v1beta +# requires_billing: true +# rest_documentation: https://cloud.google.com/memorystore/docs/valkey/reference/rest +# - api_shortname: vectorsearch +# name_pretty: Vector Search API +# product_documentation: https://docs.cloud.google.com/vertex-ai/docs/vector-search/overview +# api_description: The Vector Search API provides a fully-managed, highly performant, +# and scalable vector database designed to power next-generation search, recommendation, +# and generative AI applications. It allows you to store, index, and query your +# data and its corresponding vector embeddings through a simple, intuitive interface. +# With Vector Search, you can define custom schemas for your data, insert objects +# with associated metadata, automatically generate embeddings from your data, and +# perform fast approximate nearest neighbor (ANN) searches to find semantically +# similar items at scale. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-vectorsearch +# api_id: vectorsearch.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/vectorsearch/v1beta +# - proto_path: google/cloud/vectorsearch/v1 +# requires_billing: true +# - api_shortname: videointelligence +# name_pretty: Cloud Video Intelligence +# product_documentation: https://cloud.google.com/video-intelligence/docs/ +# api_description: allows developers to use Google video analysis technology as part +# of their applications. +# library_name: video-intelligence +# release_level: stable +# issue_tracker: https://issuetracker.google.com/savedsearches/5084810 +# rest_documentation: https://cloud.google.com/video-intelligence/docs/reference/rest +# rpc_documentation: https://cloud.google.com/video-intelligence/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/videointelligence/v1 +# - proto_path: google/cloud/videointelligence/v1beta2 +# - proto_path: google/cloud/videointelligence/v1p1beta1 +# - proto_path: google/cloud/videointelligence/v1p2beta1 +# - proto_path: google/cloud/videointelligence/v1p3beta1 +# - api_shortname: livestream +# name_pretty: Live Stream API +# product_documentation: https://cloud.google.com/livestream/ +# api_description: transcodes mezzanine live signals into direct-to-consumer streaming +# formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and +# HTTP Live Streaming (HLS), for multiple device platforms. +# library_name: video-live-stream +# distribution_name: com.google.cloud:google-cloud-live-stream +# GAPICs: +# - proto_path: google/cloud/video/livestream/v1 +# - api_shortname: videostitcher +# name_pretty: Video Stitcher API +# product_documentation: https://cloud.google.com/video-stitcher/ +# api_description: allows you to manipulate video content to dynamically insert ads +# prior to delivery to client devices. +# library_name: video-stitcher +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/video/stitcher/v1 +# - api_shortname: transcoder +# name_pretty: Video Transcoder +# product_documentation: https://cloud.google.com/transcoder/docs +# api_description: allows you to transcode videos into a variety of formats. The Transcoder +# API benefits broadcasters, production companies, businesses, and individuals looking +# to transform their video content for use across a variety of user devices. +# library_name: video-transcoder +# release_level: stable +# api_id: transcoder.googleapis.com +# rest_documentation: https://cloud.google.com/transcoder/docs/reference/rest +# rpc_documentation: https://cloud.google.com/transcoder/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/video/transcoder/v1 +# - api_shortname: vision +# name_pretty: Cloud Vision +# product_documentation: https://cloud.google.com/vision/docs/ +# api_description: allows developers to easily integrate vision detection features +# within applications, including image labeling, face and landmark detection, optical +# character recognition (OCR), and tagging of explicit content. +# release_level: stable +# issue_tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:187174 +# rest_documentation: https://cloud.google.com/vision/docs/reference/rest +# rpc_documentation: https://cloud.google.com/vision/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/vision/v1 +# - proto_path: google/cloud/vision/v1p1beta1 +# - proto_path: google/cloud/vision/v1p2beta1 +# - proto_path: google/cloud/vision/v1p3beta1 +# - proto_path: google/cloud/vision/v1p4beta1 +# - api_shortname: visionai +# name_pretty: Vision AI API +# product_documentation: https://cloud.google.com/vision-ai/docs +# api_description: Vertex AI Vision is an AI-powered platform to ingest, analyze and +# store video data. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-visionai +# api_id: visionai.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/visionai/v1 +# requires_billing: true +# rpc_documentation: https://cloud.google.com/vision-ai/docs/reference/rpc +# - api_shortname: vmmigration +# name_pretty: VM Migration +# product_documentation: n/a +# api_description: helps customers migrating VMs to GCP at no additional cost, as +# well as an extensive ecosystem of partners to help with discovery and assessment, +# planning, migration, special use cases, and more. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/vmmigration/v1 +# - api_shortname: vmwareengine +# name_pretty: Google Cloud VMware Engine +# product_documentation: https://cloud.google.com/vmware-engine/ +# api_description: Easily lift and shift your VMware-based applications to Google +# Cloud without changes to your apps, tools, or processes. +# rest_documentation: https://cloud.google.com/vmware-engine/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/vmwareengine/v1 +# - api_shortname: vpcaccess +# name_pretty: Serverless VPC Access +# product_documentation: https://cloud.google.com/vpc/docs/serverless-vpc-access +# api_description: enables you to connect from a serverless environment on Google +# Cloud directly to your VPC network. This connection makes it possible for your +# serverless environment to access resources in your VPC network via internal IP +# addresses. +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/vpcaccess/v1 +# - api_shortname: webrisk +# name_pretty: Web Risk +# product_documentation: https://cloud.google.com/web-risk/docs/ +# api_description: is a Google Cloud service that lets client applications check URLs +# against Google's constantly updated lists of unsafe web resources. Unsafe web +# resources include social engineering sites—such as phishing and deceptive sites—and +# sites that host malware or unwanted software. With the Web Risk API, you can quickly +# identify known bad sites, warn users before they click infected links, and prevent +# users from posting links to known infected pages from your site. The Web Risk +# API includes data on more than a million unsafe URLs and stays up to date by examining +# billions of URLs each day. +# release_level: stable +# requires_billing: false +# issue_tracker: '' +# rest_documentation: https://cloud.google.com/web-risk/docs/reference/rest +# rpc_documentation: https://cloud.google.com/web-risk/docs/reference/rpc +# GAPICs: +# - proto_path: google/cloud/webrisk/v1 +# - proto_path: google/cloud/webrisk/v1beta1 +# - api_shortname: websecurityscanner +# name_pretty: Cloud Security Scanner +# product_documentation: https://cloud.google.com/security-scanner/docs/ +# api_description: identifies security vulnerabilities in your App Engine, Compute +# Engine, and Google Kubernetes Engine web applications. It crawls your application, +# following all links within the scope of your starting URLs, and attempts to exercise +# as many user inputs and event handlers as possible. +# release_level: stable +# requires_billing: false +# issue_tracker: https://issuetracker.google.com/savedsearches/559748 +# GAPICs: +# - proto_path: google/cloud/websecurityscanner/v1 +# - proto_path: google/cloud/websecurityscanner/v1alpha +# - proto_path: google/cloud/websecurityscanner/v1beta +# - api_shortname: workflowexecutions +# name_pretty: Cloud Workflow Executions +# product_documentation: https://cloud.google.com/workflows +# api_description: allows you to ochestrate and automate Google Cloud and HTTP-based +# API services with serverless workflows. +# library_name: workflow-executions +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/workflows/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/workflows/executions/v1 +# - proto_path: google/cloud/workflows/executions/v1beta +# - api_shortname: workflows +# name_pretty: Cloud Workflows +# product_documentation: https://cloud.google.com/workflows +# api_description: allows you to ochestrate and automate Google Cloud and HTTP-based +# API services with serverless workflows. +# release_level: stable +# codeowner_team: '@googleapis/aap-dpes' +# rest_documentation: https://cloud.google.com/workflows/docs/reference/rest +# GAPICs: +# - proto_path: google/cloud/workflows/v1 +# - proto_path: google/cloud/workflows/v1beta +# - api_shortname: workloadmanager +# name_pretty: Workload Manager API +# product_documentation: https://docs.cloud.google.com/workload-manager/docs +# api_description: Workload Manager is a service that provides tooling for enterprise +# workloads to automate the deployment and validation of your workloads against +# best practices and recommendations. +# client_documentation: +# https://cloud.google.com/java/docs/reference/google-cloud-workloadmanager/latest/overview +# release_level: preview +# distribution_name: com.google.cloud:google-cloud-workloadmanager +# api_id: workloadmanager.googleapis.com +# library_type: GAPIC_AUTO +# group_id: com.google.cloud +# cloud_api: true +# GAPICs: +# - proto_path: google/cloud/workloadmanager/v1 +# requires_billing: true +# rpc_documentation: https://docs.cloud.google.com/workload-manager/docs/reference/rest +# - api_shortname: workspaceevents +# name_pretty: Google Workspace Events API +# product_documentation: https://developers.google.com/workspace/events +# api_description: The Google Workspace Events API lets you subscribe to events and +# manage change notifications across Google Workspace applications. +# rest_documentation: https://developers.google.com/workspace/events/reference/rest +# GAPICs: +# - proto_path: google/apps/events/subscriptions/v1 +# - proto_path: google/apps/events/subscriptions/v1beta +# - api_shortname: workstations +# name_pretty: Cloud Workstations +# product_documentation: https://cloud.google.com/workstations +# api_description: Fully managed development environments built to meet the needs +# of security-sensitive enterprises. It enhances the security of development environments +# while accelerating developer onboarding and productivity. +# rest_documentation: https://cloud.google.com/workstations/docs/reference/rest +# rpc_documentation: https://cloud.google.com/workstations/docs/reference/rpc +# release_level: stable +# GAPICs: +# - proto_path: google/cloud/workstations/v1 +# - proto_path: google/cloud/workstations/v1beta +- api_shortname: common-protos + name_pretty: Common Protos + product_documentation: https://github.com/googleapis/api-common-protos + api_description: Protobuf classes for Google's common protos. + release_level: stable + client_documentation: https://cloud.google.com/java/docs/reference/proto-google-common-protos/latest/history + distribution_name: com.google.api.grpc:proto-google-common-protos + excluded_dependencies: "proto-google-common-protos,grpc-google-common-protos,proto-google-common-protos-parent" + excluded_poms: "proto-google-common-protos-bom,proto-google-common-protos" + library_type: OTHER + GAPICs: + - proto_path: google/api + - proto_path: google/apps/card/v1 + - proto_path: google/cloud + - proto_path: google/cloud/audit + - proto_path: google/cloud/location + - proto_path: google/geo/type + - proto_path: google/logging/type + - proto_path: google/longrunning + - proto_path: google/rpc + - proto_path: google/rpc/context + - proto_path: google/shopping/type + - proto_path: google/type +- api_shortname: common-iam name_pretty: IAM - product_documentation: n/a - api_description: n/a + product_documentation: https://cloud.google.com/iam + api_description: Manages access control for Google Cloud Platform resources release_level: stable - distribution_name: com.google.cloud:google-iam-policy - client_documentation: https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/history - excluded_poms: proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1 - excluded_dependencies: google-iam-policy + client_documentation: https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/overview + distribution_name: com.google.api.grpc:proto-google-iam-v1 + excluded_dependencies: "grpc-google-iam-v1" + excluded_poms: "proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1" + library_type: OTHER GAPICs: - proto_path: google/iam/v1 - - proto_path: google/iam/v1beta - proto_path: google/iam/v2 - proto_path: google/iam/v2beta - proto_path: google/iam/v3 - proto_path: google/iam/v3beta -- api_shortname: iam-admin - name_pretty: IAM Admin API - product_documentation: https://cloud.google.com/iam/docs/apis - api_description: you to manage your Service Accounts and IAM bindings. - release_level: stable - distribution_name: com.google.cloud:google-iam-admin - api_id: iam.googleapis.com - GAPICs: - - proto_path: google/iam/admin/v1 -- api_shortname: iamcredentials - name_pretty: IAM Service Account Credentials API - product_documentation: https://cloud.google.com/iam/credentials/reference/rest/ - api_description: creates short-lived, limited-privilege credentials for IAM service - accounts. - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/issues/new?component=187161&template=0 - GAPICs: - - proto_path: google/iam/credentials/v1 -- api_shortname: iap - name_pretty: Cloud Identity-Aware Proxy API - product_documentation: https://cloud.google.com/iap - api_description: Controls access to cloud applications running on Google Cloud Platform. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-iap/latest/overview - release_level: stable - distribution_name: com.google.cloud:google-cloud-iap - api_id: iap.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/iap/v1 - requires_billing: true -- api_shortname: ids - name_pretty: Intrusion Detection System - product_documentation: https://cloud.google.com/intrusion-detection-system/docs - api_description: ' monitors your networks, and it alerts you when it detects malicious - activity. Cloud IDS is powered by Palo Alto Networks.' - release_level: stable - GAPICs: - - proto_path: google/cloud/ids/v1 -- api_shortname: infra-manager - name_pretty: Infrastructure Manager API - product_documentation: https://cloud.google.com/infrastructure-manager/docs/overview - api_description: Creates and manages Google Cloud Platform resources and infrastructure. - api_id: config.googleapis.com - release_level: stable - GAPICs: - - proto_path: google/cloud/config/v1 -- api_shortname: cloudiot - name_pretty: Cloud Internet of Things (IoT) Core - product_documentation: https://cloud.google.com/iot - api_description: is a complete set of tools to connect, process, store, and analyze - data both at the edge and in the cloud. The platform consists of scalable, fully-managed - cloud services; an integrated software stack for edge/on-premises computing with - machine learning capabilities for all your IoT needs. - library_name: iot - release_level: stable - issue_tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:310170 - GAPICs: - - proto_path: google/cloud/iot/v1 -- api_shortname: merchantapi - name_pretty: Merchant Issue Resolution API - product_documentation: https://developers.google.com/merchant/api - api_description: Programatically manage your Merchant Issues - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-issue-resolution/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-issue-resolution - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/issueresolution/v1 - - proto_path: google/shopping/merchant/issueresolution/v1beta - library_name: java-shopping-merchant-issue-resolution - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant Order Tracking API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center Accounts - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-order-tracking/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-order-tracking - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/ordertracking/v1 - - proto_path: google/shopping/merchant/ordertracking/v1beta - library_name: java-shopping-merchant-order-tracking - requires_billing: true -- api_shortname: cloudkms - name_pretty: Cloud Key Management Service - product_documentation: https://cloud.google.com/kms - api_description: a cloud-hosted key management service that lets you manage cryptographic - keys for your cloud services the same way you do on-premises. You can generate, - use, rotate, and destroy AES256, RSA 2048, RSA 3072, RSA 4096, EC P256, and EC - P384 cryptographic keys. Cloud KMS is integrated with Cloud IAM and Cloud Audit - Logging so that you can manage permissions on individual keys and monitor how - these are used. Use Cloud KMS to protect secrets and other sensitive data that - you need to store in Google Cloud Platform. - library_name: kms - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/5264932 - GAPICs: - - proto_path: google/cloud/kms/v1 -- api_shortname: kmsinventory - name_pretty: KMS Inventory API - product_documentation: https://cloud.google.com/kms/docs/ - api_description: KMS Inventory API. - rest_documentation: https://cloud.google.com/kms/docs/reference/rest - rpc_documentation: https://cloud.google.com/kms/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/kms/inventory/v1 -- api_shortname: language - name_pretty: Natural Language - product_documentation: https://cloud.google.com/natural-language/docs/ - api_description: provides natural language understanding technologies to developers, - including sentiment analysis, entity analysis, entity sentiment analysis, content - classification, and syntax analysis. This API is part of the larger Cloud Machine - Learning API family. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559753 - rest_documentation: https://cloud.google.com/natural-language/docs/reference/rest - rpc_documentation: https://cloud.google.com/natural-language/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/language/v1 - - proto_path: google/cloud/language/v1beta2 - - proto_path: google/cloud/language/v2 -- api_shortname: licensemanager - name_pretty: License Manager API - product_documentation: https://cloud.google.com/compute/docs/instances/windows/ms-licensing - api_description: License Manager is a tool to manage and track third-party licenses - on Google Cloud. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-licensemanager - api_id: licensemanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/licensemanager/v1 - requires_billing: true -- api_shortname: lifesciences - name_pretty: Cloud Life Sciences - product_documentation: https://cloud.google.com/life-sciences/docs - api_description: is a suite of services and tools for managing, processing, and - transforming life sciences data. - library_name: life-sciences - rest_documentation: https://cloud.google.com/life-sciences/docs/reference/rest - rpc_documentation: https://cloud.google.com/life-sciences/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/lifesciences/v2beta -- api_shortname: locationfinder - name_pretty: Cloud Location Finder API - product_documentation: https://cloud.google.com/location-finder/docs/overview - api_description: Cloud Location Finder is a public API that offers a repository - of all Google Cloud and Google Distributed Cloud locations, as well as cloud locations - for other cloud providers. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-locationfinder/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-locationfinder - api_id: locationfinder.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/locationfinder/v1 - requires_billing: true - rpc_documentation: https://cloud.google.com/locationfinder/docs/reference/rest -- api_shortname: logging - name_pretty: Cloud Logging - product_documentation: https://cloud.google.com/logging/docs - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-logging/latest/history - issue_tracker: https://issuetracker.google.com/savedsearches/559764 - release_level: stable - language: java - distribution_name: com.google.cloud:google-cloud-logging - api_id: logging.googleapis.com - transport: grpc - library_type: GAPIC_COMBO - api_description: allows you to store, search, analyze, monitor, and alert on log - data and events from Google Cloud and Amazon Web Services. Using the BindPlane - service, you can also collect this data from over 150 common application components, - on-premises systems, and hybrid cloud systems. BindPlane is included with your - Google Cloud project at no additional cost. - codeowner_team: '@googleapis/cloud-sdk-java-team' - recommended_package: com.google.cloud.logging - GAPICs: - - proto_path: google/logging/v2 -- api_shortname: lustre - name_pretty: Google Cloud Managed Lustre API - product_documentation: https://cloud.google.com/managed-lustre/docs - api_description: Google Cloud Managed Lustre delivers a high-performance, fully - managed parallel file system optimized for AI and HPC applications. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-lustre/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-lustre - api_id: lustre.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/lustre/v1 - requires_billing: true -- api_shortname: maintenance - name_pretty: Maintenance API - product_documentation: https://cloud.google.com/unified-maintenance/docs/overview - api_description: The Maintenance API provides a centralized view of planned disruptive - maintenance events across supported Google Cloud products. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-maintenance/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-maintenance - api_id: maintenance.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/maintenance/api/v1beta - - proto_path: google/cloud/maintenance/api/v1 - requires_billing: true - rpc_documentation: https://cloud.google.com/unified-maintenance/docs/reference/rpc -- api_shortname: managedidentities - name_pretty: Managed Service for Microsoft Active Directory - product_documentation: https://cloud.google.com/managed-microsoft-ad/ - api_description: is a highly available, hardened Google Cloud service running actual - Microsoft AD that enables you to manage authentication and authorization for your - AD-dependent workloads, automate AD server maintenance and security configuration, - and connect your on-premises AD domain to the cloud. - library_name: managed-identities - release_level: stable - api_id: managedidentities.googleapis.com - GAPICs: - - proto_path: google/cloud/managedidentities/v1 - - proto_path: google/cloud/managedidentities/v1beta1 -- api_shortname: managedkafka - name_pretty: Managed Service for Apache Kafka - product_documentation: https://cloud.google.com/managed-kafka - api_description: Manage Apache Kafka clusters and resources. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-managedkafka/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-managedkafka - api_id: managedkafka.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/managedkafka/v1 - requires_billing: true -- api_shortname: maps-addressvalidation - name_pretty: Address Validation API - product_documentation: https://developers.google.com/maps/documentation/address-validation/ - api_description: The Address Validation API allows developers to verify the accuracy - of addresses. Given an address, it returns information about the correctness of - the components of the parsed address, a geocode, and a verdict on the deliverability - of the parsed address. - api_id: addressvalidation.googleapis.com - cloud_api: false - distribution_name: com.google.maps:google-maps-addressvalidation - GAPICs: - - proto_path: google/maps/addressvalidation/v1 -- api_shortname: maps-area-insights - name_pretty: Places Insights API - product_documentation: https://developers.google.com/maps/documentation/places-insights - api_description: Places Insights API. - client_documentation: - https://cloud.google.com/java/docs/reference/google-maps-area-insights/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-area-insights - api_id: maps-area-insights.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/areainsights/v1 - requires_billing: true -- api_shortname: maps-fleetengine - name_pretty: Local Rides and Deliveries API - product_documentation: - https://developers.google.com/maps/documentation/transportation-logistics/mobility - api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries - and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the - Cloud Logging Services is subject to the Google Maps Platform Terms of Service - located at https://cloud.google.com/maps-platform/terms. - client_documentation: - https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-fleetengine - api_id: maps-fleetengine.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/fleetengine/v1 - requires_billing: true -- api_shortname: maps-fleetengine-delivery - name_pretty: Last Mile Fleet Solution Delivery API - product_documentation: - https://developers.google.com/maps/documentation/transportation-logistics/mobility - api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries - and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the - Cloud Logging Services is subject to the Google Maps Platform Terms of Service - located at https://cloud.google.com/maps-platform/terms. - client_documentation: - https://cloud.google.com/java/docs/reference/google-maps-fleetengine-delivery/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-fleetengine-delivery - api_id: maps-fleetengine-delivery.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/fleetengine/delivery/v1 - requires_billing: true -- api_shortname: geocode - name_pretty: Geocoding API - product_documentation: https://developers.google.com/maps/documentation/geocoding/overview - api_description: The Geocoding API is a service that accepts a place as an address, - latitude and longitude coordinates, or Place ID. - client_documentation: https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-geocode - api_id: geocode.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/geocode/v4 - library_name: maps-geocode - requires_billing: true -- api_shortname: maps-mapsplatformdatasets - name_pretty: Maps Platform Datasets API - product_documentation: https://developers.google.com/maps/documentation - api_description: "The Maps Platform Datasets API enables developers to ingest geospatially-tied - datasets\n that they can use to enrich their experience of Maps Platform solutions - (e.g. styling, routing)." - api_id: mapsplatformdatasets.googleapis.com - distribution_name: com.google.maps:google-maps-mapsplatformdatasets - cloud_api: false - GAPICs: - - proto_path: google/maps/mapsplatformdatasets/v1 -- api_shortname: maps-places - name_pretty: Places API (New) - product_documentation: https://developers.google.com/maps/documentation/places/web-service/ - api_description: The Places API allows developers to access a variety of search - and retrieval endpoints for a Place. - api_id: places.googleapis.com - distribution_name: com.google.maps:google-maps-places - cloud_api: false - GAPICs: - - proto_path: google/maps/places/v1 -- api_shortname: routeoptimization - name_pretty: Route Optimization API - product_documentation: https://developers.google.com/maps/documentation/route-optimization - api_description: The Route Optimization API assigns tasks and routes to a vehicle - fleet, optimizing against the objectives and constraints that you supply for your - transportation goals. - client_documentation: - https://cloud.google.com/java/docs/reference/google-maps-routeoptimization/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-routeoptimization - api_id: routeoptimization.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/routeoptimization/v1 - library_name: maps-routeoptimization - requires_billing: true - rest_documentation: - https://developers.google.com/maps/documentation/route-optimization/reference/rest/ - rpc_documentation: - https://developers.google.com/maps/documentation/route-optimization/reference/rpc -- api_shortname: maps-routing - name_pretty: Routes API - product_documentation: https://developers.google.com/maps/documentation/routes - api_description: Routes API is the next generation, performance optimized version - of the existing Directions API and Distance Matrix API. It helps you find the - ideal route from A to Z, calculates ETAs and distances for matrices of origin - and destination locations, and also offers new features. - release_level: stable - api_id: routes.googleapis.com - distribution_name: com.google.maps:google-maps-routing - cloud_api: false - GAPICs: - - proto_path: google/maps/routing/v2 -- api_shortname: maps-solar - name_pretty: Solar API - product_documentation: https://developers.google.com/maps/documentation/solar/overview - api_description: The Solar API allows users to read details about the solar potential - of over 60 million buildings. This includes measurements of the building's roof - (e.g., size and tilt/azimuth), energy production for a range of sizes of solar - installations, and financial costs and benefits. - client_documentation: https://cloud.google.com/java/docs/reference/google-maps-solar/latest/overview - release_level: preview - distribution_name: com.google.maps:google-maps-solar - api_id: maps-solar.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.maps - cloud_api: false - GAPICs: - - proto_path: google/maps/solar/v1 - requires_billing: true - rpc_documentation: https://developers.google.com/maps/documentation/solar/reference/rest -- api_shortname: marketingplatformadminapi - name_pretty: Google Marketing Platform Admin API - product_documentation: https://developers.google.com/analytics/devguides/config/gmp/v1 - api_description: The Google Marketing Platform Admin API allows for programmatic - access to the Google Marketing Platform configuration data. You can use the Google - Marketing Platform Admin API to manage links between your Google Marketing Platform - organization and Google Analytics accounts, and to set the service level of your - GA4 properties. - client_documentation: https://cloud.google.com/java/docs/reference/admin/latest/overview - release_level: preview - distribution_name: com.google.ads-marketingplatform:admin - api_id: marketingplatformadminapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.ads-marketingplatform - cloud_api: false - GAPICs: - - proto_path: google/marketingplatform/admin/v1alpha - requires_billing: true -- api_shortname: mediatranslation - name_pretty: Media Translation API - product_documentation: https://cloud.google.com/ - api_description: provides enterprise quality translation from/to various media types. - requires_billing: false - GAPICs: - - proto_path: google/cloud/mediatranslation/v1beta1 -- api_shortname: meet - name_pretty: Google Meet API - product_documentation: https://developers.google.com/meet/api/guides/overview - api_description: The Google Meet REST API lets you create and manage meetings for - Google Meet and offers entry points to your users directly from your app - GAPICs: - - proto_path: google/apps/meet/v2 - - proto_path: google/apps/meet/v2beta -- api_shortname: memcache - name_pretty: Cloud Memcache - product_documentation: https://cloud.google.com/memorystore/ - api_description: is a fully-managed in-memory data store service for Memcache. - release_level: stable - requires_billing: false - GAPICs: - - proto_path: google/cloud/memcache/v1 - - proto_path: google/cloud/memcache/v1beta2 -- api_shortname: migrationcenter - name_pretty: Migration Center API - product_documentation: https://cloud.google.com/migration-center/docs/migration-center-overview - api_description: Google Cloud Migration Center is a unified platform that helps - you accelerate your end-to-end cloud journey from your current on-premises or - cloud environments to Google Cloud - GAPICs: - - proto_path: google/cloud/migrationcenter/v1 -- api_shortname: modelarmor - name_pretty: Model Armor API - product_documentation: https://cloud.google.com/security-command-center/docs/model-armor-overview - api_description: Model Armor helps you protect against risks like prompt injection, - harmful content, and data leakage in generative AI applications by letting you - define policies that filter user prompts and model responses. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-modelarmor - api_id: modelarmor.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/modelarmor/v1 - - proto_path: google/cloud/modelarmor/v1beta - requires_billing: true -- api_shortname: monitoring - name_pretty: Stackdriver Monitoring - product_documentation: https://cloud.google.com/monitoring/docs - api_description: collects metrics, events, and metadata from Google Cloud, Amazon - Web Services (AWS), hosted uptime probes, and application instrumentation. Using - the BindPlane service, you can also collect this data from over 150 common application - components, on-premise systems, and hybrid cloud systems. Stackdriver ingests - that data and generates insights via dashboards, charts, and alerts. BindPlane - is included with your Google Cloud project at no additional cost. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559785 - GAPICs: - - proto_path: google/monitoring/v3 -- api_shortname: monitoring-dashboards - name_pretty: Monitoring Dashboards - product_documentation: https://cloud.google.com/monitoring/charts/dashboards - api_description: are one way for you to view and analyze metric data. The Cloud - Console provides predefined dashboards that require no setup or configuration. - You can also define custom dashboards. With custom dashboards, you have complete - control over the charts that are displayed and their configuration. - release_level: stable - distribution_name: com.google.cloud:google-cloud-monitoring-dashboard - api_id: monitoring.googleapis.com - GAPICs: - - proto_path: google/monitoring/dashboard/v1 -- api_shortname: monitoring-metricsscope - name_pretty: Monitoring Metrics Scopes - product_documentation: - https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes - api_description: The metrics scope defines the set of Google Cloud projects whose - metrics the current Google Cloud project can access. - api_id: monitoring.googleapis.com - distribution_name: com.google.cloud:google-cloud-monitoring-metricsscope - GAPICs: - - proto_path: google/monitoring/metricsscope/v1 -- api_shortname: netapp - name_pretty: NetApp API - product_documentation: https://cloud.google.com/netapp/volumes/docs/discover/overview - api_description: Google Cloud NetApp Volumes is a fully-managed, cloud-based data - storage service that provides advanced data management capabilities and highly - scalable performance with global availability. - GAPICs: - - proto_path: google/cloud/netapp/v1 -- api_shortname: networkmanagement - name_pretty: Network Management API - product_documentation: - https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/ - api_description: provides a collection of network performance monitoring and diagnostic - capabilities. - library_name: network-management - release_level: stable - GAPICs: - - proto_path: google/cloud/networkmanagement/v1 - - proto_path: google/cloud/networkmanagement/v1beta1 -- api_shortname: networksecurity - name_pretty: Network Security API - product_documentation: https://cloud.google.com/traffic-director/docs/reference/network-security/rest - api_description: n/a - library_name: network-security - release_level: stable - GAPICs: - - proto_path: google/cloud/networksecurity/v1 - - proto_path: google/cloud/networksecurity/v1beta1 -- api_shortname: networkconnectivity - name_pretty: Network Connectivity Center - product_documentation: https://cloud.google.com/network-connectivity/docs - api_description: Google's suite of products that provide enterprise connectivity - from your on-premises network or from another cloud provider to your Virtual Private - Cloud (VPC) network - release_level: stable - GAPICs: - - proto_path: google/cloud/networkconnectivity/v1 - - proto_path: google/cloud/networkconnectivity/v1alpha1 - - proto_path: google/cloud/networkconnectivity/v1beta -- api_shortname: networkservices - name_pretty: Network Services API - product_documentation: https://cloud.google.com/products/networking - api_description: Google Cloud offers a broad portfolio of networking services built - on top of planet-scale infrastructure that leverages automation, advanced AI, - and programmability, enabling enterprises to connect, scale, secure, modernize - and optimize their infrastructure. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-networkservices - api_id: networkservices.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/networkservices/v1 - requires_billing: true -- api_shortname: notebooks - name_pretty: AI Platform Notebooks - product_documentation: https://cloud.google.com/ai-platform-notebooks - api_description: is a managed service that offers an integrated and secure JupyterLab - environment for data scientists and machine learning developers to experiment, - develop, and deploy models into production. Users can create instances running - JupyterLab that come pre-installed with the latest data science and machine learning - frameworks in a single click. - release_level: stable - GAPICs: - - proto_path: google/cloud/notebooks/v1 - - proto_path: google/cloud/notebooks/v1beta1 - - proto_path: google/cloud/notebooks/v2 -- api_shortname: cloudoptimization - name_pretty: Cloud Fleet Routing - product_documentation: https://cloud.google.com/optimization/docs - api_description: is a managed routing service that takes your list of orders, vehicles, - constraints, and objectives and returns the most efficient plan for your entire - fleet in near real-time. - library_name: optimization - release_level: stable - rest_documentation: https://cloud.google.com/optimization/docs/reference/rest - rpc_documentation: https://cloud.google.com/optimization/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/optimization/v1 -- api_shortname: oracledatabase - name_pretty: Oracle Database@Google Cloud API - product_documentation: https://cloud.google.com/oracle/database/docs - api_description: The Oracle Database@Google Cloud API provides a set of APIs to - manage Oracle database services, such as Exadata and Autonomous Databases. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-oracledatabase/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-oracledatabase - api_id: oracledatabase.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/oracledatabase/v1 - requires_billing: true -- api_shortname: orchestration-airflow - name_pretty: Cloud Composer - product_documentation: https://cloud.google.com/composer/docs - api_description: is a managed Apache Airflow service that helps you create, schedule, - monitor and manage workflows. Cloud Composer automation helps you create Airflow - environments quickly and use Airflow-native tools, such as the powerful Airflow - web interface and command line tools, so you can focus on your workflows and not - your infrastructure. - release_level: stable - api_id: composer.googleapis.com - rest_documentation: https://cloud.google.com/composer/docs/reference/rest - rpc_documentation: https://cloud.google.com/composer/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/orchestration/airflow/service/v1 - - proto_path: google/cloud/orchestration/airflow/service/v1beta1 -- api_shortname: orgpolicy - name_pretty: Cloud Organization Policy - product_documentation: n/a - api_description: n/a - release_level: stable - client_documentation: - https://cloud.google.com/java/docs/reference/proto-google-cloud-orgpolicy-v1/latest/overview - GAPICs: - - proto_path: google/cloud/orgpolicy/v1 - - proto_path: google/cloud/orgpolicy/v2 -- api_shortname: osconfig - name_pretty: OS Config API - product_documentation: https://cloud.google.com/compute/docs/os-patch-management - api_description: provides OS management tools that can be used for patch management, - patch compliance, and configuration management on VM instances. - library_name: os-config - release_level: stable - requires_billing: false - api_id: osconfig.googleapis.com - GAPICs: - - proto_path: google/cloud/osconfig/v1 - - proto_path: google/cloud/osconfig/v1alpha - - proto_path: google/cloud/osconfig/v1beta -- api_shortname: oslogin - name_pretty: Cloud OS Login - product_documentation: https://cloud.google.com/compute/docs/oslogin/ - api_description: manages OS login configuration for Directory API users. - library_name: os-login - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559755 - GAPICs: - - proto_path: google/cloud/oslogin/v1 - - proto_path: google/cloud/oslogin/v1beta -- api_shortname: parallelstore - name_pretty: Parallelstore API - product_documentation: https://cloud/parallelstore?hl=en - api_description: 'Parallelstore is based on Intel DAOS and delivers up to 6.3x greater - read throughput performance compared to competitive Lustre scratch offerings. ' - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-parallelstore/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-parallelstore - api_id: parallelstore.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/parallelstore/v1beta - - proto_path: google/cloud/parallelstore/v1 - requires_billing: true -- api_shortname: parametermanager - name_pretty: Parameter Manager API - product_documentation: https://cloud.google.com/secret-manager/parameter-manager/docs/overview - api_description: (Public Preview) Parameter Manager is a single source of truth - to store, access and manage the lifecycle of your workload parameters. Parameter Manager - aims to make management of sensitive application parameters effortless for - customers without diminishing focus on security. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-parametermanager/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-parametermanager - api_id: parametermanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/parametermanager/v1 - requires_billing: true -- api_shortname: phishingprotection - name_pretty: Phishing Protection - product_documentation: https://cloud.google.com/phishing-protection/docs/ - api_description: helps prevent users from accessing phishing sites by identifying - various signals associated with malicious content, including the use of your brand - assets, classifying malicious content that uses your brand and reporting the unsafe - URLs to Google Safe Browsing. Once a site is propagated to Safe Browsing, users - will see warnings across more than 4 billion devices. - issue_tracker: '' - requires_billing: false - GAPICs: - - proto_path: google/cloud/phishingprotection/v1beta1 -- api_shortname: policytroubleshooter - name_pretty: IAM Policy Troubleshooter API - product_documentation: https://cloud.google.com/iam/docs/troubleshooting-access - api_description: makes it easier to understand why a user has access to a resource - or doesn't have permission to call an API. Given an email, resource, and permission, - Policy Troubleshooter examines all Identity and Access Management (IAM) policies - that apply to the resource. It then reveals whether the member's roles include - the permission on that resource and, if so, which policies bind the member to - those roles. - library_name: policy-troubleshooter - release_level: stable - api_id: policytroubleshooter.googleapis.com - GAPICs: - - proto_path: google/cloud/policytroubleshooter/v1 - - proto_path: google/cloud/policytroubleshooter/iam/v3 -- api_shortname: policysimulator - name_pretty: Policy Simulator API - product_documentation: https://cloud.google.com/policysimulator/docs/overview - api_description: Policy Simulator is a collection of endpoints for creating, running, - and viewing a Replay. - GAPICs: - - proto_path: google/cloud/policysimulator/v1 -- api_shortname: cloudprivatecatalog - name_pretty: Private Catalog - product_documentation: https://cloud.google.com/private-catalog/docs - api_description: allows developers and cloud admins to make their solutions discoverable - to their internal enterprise users. Cloud admins can manage their solutions and - ensure their users are always launching the latest versions. - library_name: private-catalog - api_id: privatecatalog.googleapis.com - GAPICs: - - proto_path: google/cloud/privatecatalog/v1beta1 -- api_shortname: privilegedaccessmanager - name_pretty: Privileged Access Manager API - product_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview - api_description: Privileged Access Manager (PAM) helps you on your journey towards - least privilege and helps mitigate risks tied to privileged access misuse orabuse. - PAM allows you to shift from always-on standing privileges towards on-demand access - with just-in-time, time-bound, and approval-based access elevations. PAM allows - IAM administrators to create entitlements that can grant just-in-time, temporary - access to any resource scope. Requesters can explore eligible entitlements and - request the access needed for their task. Approvers are notified when approvals - await their decision. Streamlined workflows facilitated by using PAM can support - various use cases, including emergency access for incident responders, time-boxed - access for developers for critical deployment or maintenance, temporary access - for operators for data ingestion and audits, JIT access to service accounts for - automated tasks, and more. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-privilegedaccessmanager - api_id: privilegedaccessmanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/privilegedaccessmanager/v1 - requires_billing: true - rpc_documentation: https://cloud.google.com/iam/docs/reference/pam/rpc -- api_shortname: cloudprofiler - name_pretty: Cloud Profiler - product_documentation: https://cloud.google.com/profiler/docs - api_description: is a statistical, low-overhead profiler that continuously gathers - CPU usage and memory-allocation information from your production applications. - It attributes that information to the application's source code, helping you identify - the parts of the application consuming the most resources, and otherwise illuminating - the performance characteristics of the code. - library_name: profiler - release_level: stable - api_id: cloudprofiler.googleapis.com - GAPICs: - - proto_path: google/devtools/cloudprofiler/v2 -- api_shortname: publicca - name_pretty: Public Certificate Authority API - product_documentation: https://cloud.google.com/certificate-manager/docs/public-ca - api_description: The Public Certificate Authority API may be used to create and - manage ACME external account binding keys associated with Google Trust Services' - publicly trusted certificate authority. - rpc_documentation: https://cloud.google.com/certificate-manager/docs/reference/public-ca/rpc - release_level: stable - GAPICs: - - proto_path: google/cloud/security/publicca/v1beta1 - - proto_path: google/cloud/security/publicca/v1 -- api_shortname: rapidmigrationassessment - name_pretty: Rapid Migration Assessment API - product_documentation: https://cloud.google.com/migration-center/docs - api_description: Rapid Migration Assessment API - GAPICs: - - proto_path: google/cloud/rapidmigrationassessment/v1 -- api_shortname: recaptchaenterprise - name_pretty: reCAPTCHA Enterprise - product_documentation: https://cloud.google.com/recaptcha-enterprise/docs/ - api_description: is a service that protects your site from spam and abuse. - release_level: stable - issue_tracker: '' - requires_billing: false - rest_documentation: https://cloud.google.com/recaptcha-enterprise/docs/reference/rest - rpc_documentation: https://cloud.google.com/recaptcha-enterprise/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/recaptchaenterprise/v1 - - proto_path: google/cloud/recaptchaenterprise/v1beta1 -- api_shortname: recommendationengine - name_pretty: Recommendations AI - product_documentation: https://cloud.google.com/recommendations-ai/ - api_description: delivers highly personalized product recommendations at scale. - library_name: recommendations-ai - GAPICs: - - proto_path: google/cloud/recommendationengine/v1beta1 -- api_shortname: recommender - name_pretty: Recommender - product_documentation: https://cloud.google.com/recommendations/ - api_description: delivers highly personalized product recommendations at scale. - release_level: stable - issue_tracker: '' - GAPICs: - - proto_path: google/cloud/recommender/v1 - - proto_path: google/cloud/recommender/v1beta1 -- api_shortname: redis - name_pretty: Cloud Redis - product_documentation: https://cloud.google.com/memorystore/docs/redis/ - api_description: is a fully managed Redis service for the Google Cloud. Applications - running on Google Cloud can achieve extreme performance by leveraging the highly - scalable, available, secure Redis service without the burden of managing complex - Redis deployments. - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/5169231 - GAPICs: - - proto_path: google/cloud/redis/v1 - - proto_path: google/cloud/redis/v1beta1 -- api_shortname: redis-cluster - name_pretty: Google Cloud Memorystore for Redis API - product_documentation: https://cloud.google.com/memorystore/docs/cluster - api_description: Creates and manages Redis instances on the Google Cloud Platform. - GAPICs: - - proto_path: google/cloud/redis/cluster/v1 - - proto_path: google/cloud/redis/cluster/v1beta1 -- api_shortname: cloudresourcemanager - name_pretty: Resource Manager API - product_documentation: https://cloud.google.com/resource-manager - api_description: enables you to programmatically manage resources by project, folder, - and organization. - library_name: resourcemanager - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/559757 - GAPICs: - - proto_path: google/cloud/resourcemanager/v3 -- api_shortname: retail - name_pretty: Cloud Retail - product_documentation: https://cloud.google.com/solutions/retail - api_description: Retail solutions API. - release_level: stable - GAPICs: - - proto_path: google/cloud/retail/v2 - - proto_path: google/cloud/retail/v2alpha - - proto_path: google/cloud/retail/v2beta -- api_shortname: run - name_pretty: Cloud Run - product_documentation: https://cloud.google.com/run/docs - api_description: is a managed compute platform that enables you to run containers - that are invocable via requests or events. - rest_documentation: https://cloud.google.com/run/docs/reference/rest - rpc_documentation: https://cloud.google.com/run/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/run/v2 -- api_shortname: saasservicemgmt - name_pretty: SaaS Runtime API - product_documentation: https://cloud.google.com/saas-runtime/docs/overview - api_description: "Model, deploy, and operate your SaaS at scale.\t" - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-saasservicemgmt/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-saasservicemgmt - api_id: saasservicemgmt.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/saasplatform/saasservicemgmt/v1beta1 - requires_billing: true - rpc_documentation: https://cloud.google.com/saas-runtime/docs/apis -- api_shortname: cloudscheduler - name_pretty: Google Cloud Scheduler - product_documentation: https://cloud.google.com/scheduler/docs - api_description: lets you set up scheduled units of work to be executed at defined - times or regular intervals. These work units are commonly known as cron jobs. - Typical use cases might include sending out a report email on a daily basis, updating - some cached data every 10 minutes, or updating some summary information once an - hour. - library_name: scheduler - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/5411429 - rest_documentation: https://cloud.google.com/scheduler/docs/reference/rest - rpc_documentation: https://cloud.google.com/scheduler/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/scheduler/v1 - - proto_path: google/cloud/scheduler/v1beta1 -- api_shortname: secretmanager - name_pretty: Secret Management - product_documentation: https://cloud.google.com/solutions/secrets-management/ - api_description: allows you to encrypt, store, manage, and audit infrastructure - and application-level secrets. - release_level: stable - requires_billing: false - GAPICs: - - proto_path: google/cloud/secretmanager/v1 - - proto_path: google/cloud/secretmanager/v1beta2 - - proto_path: google/cloud/secrets/v1beta1 -- api_shortname: securesourcemanager - name_pretty: Secure Source Manager API - product_documentation: https://cloud.google.com/secure-source-manager/docs/overview - api_description: "Regionally deployed, single-tenant managed source code repository - hosted on\n Google Cloud." - release_level: stable - GAPICs: - - proto_path: google/cloud/securesourcemanager/v1 -- api_shortname: privateca - name_pretty: Certificate Authority Service - product_documentation: https://cloud.google.com/certificate-authority-service/docs - api_description: simplifies the deployment and management of private CAs without - managing infrastructure. - library_name: security-private-ca - release_level: stable - api_id: privateca.googleapis.com - rest_documentation: https://cloud.google.com/certificate-authority-service/docs/reference/rest - rpc_documentation: https://cloud.google.com/certificate-authority-service/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/security/privateca/v1 - - proto_path: google/cloud/security/privateca/v1beta1 -- api_shortname: securitycenter - name_pretty: Security Command Center - product_documentation: https://cloud.google.com/security-command-center - api_description: makes it easier for you to prevent, detect, and respond to threats. - Identify security misconfigurations in virtual machines, networks, applications, - and storage buckets from a centralized dashboard. Take action on them before they - can potentially result in business damage or loss. Built-in capabilities can quickly - surface suspicious activity in your Stackdriver security logs or indicate compromised - virtual machines. Respond to threats by following actionable recommendations or - exporting logs to your SIEM for further investigation. - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/559748 - rest_documentation: https://cloud.google.com/security-command-center/docs/reference/rest - GAPICs: - - proto_path: google/cloud/securitycenter/v1 - - proto_path: google/cloud/securitycenter/v1beta1 - - proto_path: google/cloud/securitycenter/v1p1beta1 - - proto_path: google/cloud/securitycenter/v2 -- api_shortname: securitycenter - name_pretty: Security Command Center Settings API - product_documentation: https://cloud.google.com/security-command-center/ - api_description: is the canonical security and data risk database for Google Cloud. - Security Command Center enables you to understand your security and data attack - surface by providing asset inventory, discovery, search, and management. - library_name: securitycenter-settings - api_id: securitycenter-settings.googleapis.com - requires_billing: false - rest_documentation: https://cloud.google.com/security-command-center/docs/reference/rest - GAPICs: - - proto_path: google/cloud/securitycenter/settings/v1beta1 -- api_shortname: securitycentermanagement - name_pretty: Security Center Management API - product_documentation: https://cloud.google.com/securitycentermanagement/docs/overview - api_description: Security Center Management API - release_level: stable - GAPICs: - - proto_path: google/cloud/securitycentermanagement/v1 -- api_shortname: securityposture - name_pretty: Security Posture API - product_documentation: https://cloud.google.com/security-command-center/docs/security-posture-overview - api_description: Security Posture is a comprehensive framework of policy sets that - empowers organizations to define, assess early, deploy, and monitor their security - measures in a unified way and helps simplify governance and reduces administrative - toil. - release_level: stable - GAPICs: - - proto_path: google/cloud/securityposture/v1 -- api_shortname: servicecontrol - name_pretty: Service Control API - product_documentation: https://cloud.google.com/service-infrastructure/docs/overview/ - api_description: ' is a foundational platform for creating, managing, securing, - and consuming APIs and services across organizations. It is used by Google APIs, - Cloud APIs, Cloud Endpoints, and API Gateway.' - library_name: service-control - release_level: stable - GAPICs: - - proto_path: google/api/servicecontrol/v1 - - proto_path: google/api/servicecontrol/v2 -- api_shortname: servicemanagement - name_pretty: Service Management API - product_documentation: https://cloud.google.com/service-infrastructure/docs/overview/ - api_description: is a foundational platform for creating, managing, securing, and - consuming APIs and services across organizations. It is used by Google APIs, Cloud - APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide - range of features to service consumers and service producers, including authentication, - authorization, auditing, rate limiting, analytics, billing, logging, and monitoring. - library_name: service-management - release_level: stable - api_id: servicemanagement.googleapis.com - GAPICs: - - proto_path: google/api/servicemanagement/v1 -- api_shortname: serviceusage - name_pretty: Service Usage - product_documentation: https://cloud.google.com/service-usage/docs/overview - api_description: is an infrastructure service of Google Cloud that lets you list - and manage other APIs and services in your Cloud projects. - library_name: service-usage - release_level: stable - GAPICs: - - proto_path: google/api/serviceusage/v1 - - proto_path: google/api/serviceusage/v1beta1 -- api_shortname: servicedirectory - name_pretty: Service Directory - product_documentation: https://cloud.google.com/service-directory/ - api_description: allows the registration and lookup of service endpoints. - release_level: stable - requires_billing: false - rest_documentation: https://cloud.google.com/service-directory/docs/reference/rest - rpc_documentation: https://cloud.google.com/service-directory/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/servicedirectory/v1 - - proto_path: google/cloud/servicedirectory/v1beta1 -- api_shortname: servicehealth - name_pretty: Service Health API - product_documentation: https://cloud.google.com/service-health/docs/overview - api_description: Personalized Service Health helps you gain visibility into disruptive - events impacting Google Cloud products. - rpc_documentation: https://cloud.google.com/service-health/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/servicehealth/v1 -- api_shortname: cloudshell - name_pretty: Cloud Shell - product_documentation: https://cloud.google.com/shell/docs - api_description: is an interactive shell environment for Google Cloud that makes - it easy for you to learn and experiment with Google Cloud and manage your projects - and resources from your web browser. - library_name: shell - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/shell/docs/reference/rest - rpc_documentation: https://cloud.google.com/shell/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/shell/v1 -- api_shortname: css - name_pretty: CSS API - product_documentation: https://developers.google.com/comparison-shopping-services/api - api_description: The CSS API is used to manage your CSS and control your CSS Products - portfolio - library_name: shopping-css - cloud_api: false - distribution_name: com.google.shopping:google-shopping-css - GAPICs: - - proto_path: google/shopping/css/v1 -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-accounts - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/accounts/v1 - - proto_path: google/shopping/merchant/accounts/v1beta - library_name: shopping-merchant-accounts - requires_billing: true -- api_shortname: shopping-merchant-conversions - name_pretty: Merchant Conversions API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-conversions/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-conversions - api_id: shopping-merchant-conversions.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/conversions/v1 - - proto_path: google/shopping/merchant/conversions/v1beta - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-datasources - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/datasources/v1 - - proto_path: google/shopping/merchant/datasources/v1beta - library_name: shopping-merchant-datasources - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - library_name: shopping-merchant-inventories - cloud_api: false - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-inventories - GAPICs: - - proto_path: google/shopping/merchant/inventories/v1 - - proto_path: google/shopping/merchant/inventories/v1beta -- api_shortname: shopping-merchant-lfp - name_pretty: Merchant LFP API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-lfp/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-lfp - api_id: shopping-merchant-lfp.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/lfp/v1 - - proto_path: google/shopping/merchant/lfp/v1beta - requires_billing: true -- api_shortname: shopping-merchant-notifications - name_pretty: Merchant Notifications API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-notifications/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-notifications - api_id: shopping-merchant-notifications.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/notifications/v1 - - proto_path: google/shopping/merchant/notifications/v1beta - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your products. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-productstudio/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-productstudio - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/productstudio/v1alpha - library_name: shopping-merchant-product-studio - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-products - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/products/v1 - - proto_path: google/shopping/merchant/products/v1beta - library_name: shopping-merchant-products -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-promotions - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/promotions/v1 - - proto_path: google/shopping/merchant/promotions/v1beta - library_name: shopping-merchant-promotions - requires_billing: true -- api_shortname: shopping-merchant-quota - name_pretty: Merchant Quota API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-quota/latest/overview - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-quota - api_id: shopping-merchant-quota.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/quota/v1 - - proto_path: google/shopping/merchant/quota/v1beta - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - library_name: shopping-merchant-reports - cloud_api: false - release_level: stable - distribution_name: com.google.shopping:google-shopping-merchant-reports - GAPICs: - - proto_path: google/shopping/merchant/reports/v1 - - proto_path: google/shopping/merchant/reports/v1beta - - proto_path: google/shopping/merchant/reports/v1alpha -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center Accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-reviews/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-reviews - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/reviews/v1beta - requires_billing: true - library_name: shopping-merchant-reviews -- api_shortname: spanner - name_pretty: Cloud Spanner - product_documentation: https://cloud.google.com/spanner/docs/ - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history - api_description: is a fully managed, mission-critical, relational database service - that offers transactional consistency at global scale, schemas, SQL (ANSI 2011 - with extensions), and automatic, synchronous replication for high availability. - Be sure to activate the Cloud Spanner API on the Developer's Console to use Cloud - Spanner from your project. - issue_tracker: https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open - release_level: stable - language: java - min_java_version: 8 - distribution_name: com.google.cloud:google-cloud-spanner - api_id: spanner.googleapis.com - transport: grpc - requires_billing: true - codeowner_team: '@googleapis/spanner-team' - library_type: GAPIC_COMBO - excluded_poms: google-cloud-spanner-bom,google-cloud-spanner - recommended_package: com.google.cloud.spanner - GAPICs: - - proto_path: google/spanner/admin/database/v1 - - proto_path: google/spanner/admin/instance/v1 - - proto_path: google/spanner/executor/v1 - - proto_path: google/spanner/v1 -- api_shortname: spanneradapter - name_pretty: Cloud Spanner Adapter API - product_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview - api_description: The Cloud Spanner Adapter service allows native drivers of supported database - dialects to interact directly with Cloud Spanner by wrapping the underlying wire - protocol used by the driver in a gRPC stream. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-spanneradapter - api_id: spanneradapter.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/spanner/adapter/v1 - requires_billing: true -- api_shortname: speech - name_pretty: Cloud Speech - product_documentation: https://cloud.google.com/speech-to-text/docs/ - api_description: enables easy integration of Google speech recognition technologies - into developer applications. Send audio and receive a text transcription from - the Speech-to-Text API service. - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/559758 - rest_documentation: https://cloud.google.com/speech-to-text/docs/reference/rest - rpc_documentation: https://cloud.google.com/speech-to-text/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/speech/v1 - - proto_path: google/cloud/speech/v1p1beta1 - - proto_path: google/cloud/speech/v2 -- api_shortname: storage - name_pretty: Cloud Storage - product_documentation: https://cloud.google.com/storage - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/history - api_description: 'is a durable and highly available object storage service. Google - Cloud Storage is almost infinitely scalable and guarantees consistency: when a - write succeeds, the latest copy of the object will be returned to any GET, globally.' - issue_tracker: https://issuetracker.google.com/savedsearches/559782 - release_level: stable - language: java - distribution_name: com.google.cloud:google-cloud-storage - codeowner_team: '@googleapis/gcs-team' - api_id: storage.googleapis.com - requires_billing: true - library_type: GAPIC_COMBO - extra_versioned_modules: gapic-google-cloud-storage-v2 - excluded_poms: google-cloud-storage-bom,google-cloud-storage - recommended_package: com.google.cloud.storage - transport: rest - GAPICs: - - proto_path: google/storage/v2 - - proto_path: google/storage/control/v2 -- api_shortname: storagetransfer - name_pretty: Storage Transfer Service - product_documentation: https://cloud.google.com/storage-transfer-service - api_description: Secure, low-cost services for transferring data from cloud or on-premises - sources. - library_name: storage-transfer - release_level: stable - GAPICs: - - proto_path: google/storagetransfer/v1 -- api_shortname: storagebatchoperations - name_pretty: Storage Batch Operations API - product_documentation: https://cloud.google.com/storage/docs/batch-operations/overview - api_description: Storage batch operations is a Cloud Storage management feature - that performs operations on billions of Cloud Storage objects in a serverless - manner. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-storagebatchoperations/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-storagebatchoperations - api_id: storagebatchoperations.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/storagebatchoperations/v1 - requires_billing: true -- api_shortname: storageinsights - name_pretty: Storage Insights API - product_documentation: https://cloud.google.com/storage/docs/insights/storage-insights/ - api_description: Provides insights capability on Google Cloud Storage - GAPICs: - - proto_path: google/cloud/storageinsights/v1 -- api_shortname: jobs - name_pretty: Talent Solution - product_documentation: https://cloud.google.com/solutions/talent-solution/ - api_description: allows you to transform your job search and candidate matching - capabilities with Cloud Talent Solution, designed to support enterprise talent - acquisition technology and evolve with your growing needs. This AI solution includes - features such as Job Search and Profile Search (Beta) to provide candidates and - employers with an enhanced talent acquisition experience. Learn more about Cloud - Talent Solution from the product overview page. - library_name: talent - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/559664 - GAPICs: - - proto_path: google/cloud/talent/v4 - - proto_path: google/cloud/talent/v4beta1 -- api_shortname: cloudtasks - name_pretty: Cloud Tasks - product_documentation: https://cloud.google.com/tasks/docs/ - api_description: a fully managed service that allows you to manage the execution, - dispatch and delivery of a large number of distributed tasks. You can asynchronously - perform work outside of a user request. Your tasks can be executed on App Engine - or any arbitrary HTTP endpoint. - library_name: tasks - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - issue_tracker: https://issuetracker.google.com/savedsearches/5433985 - rest_documentation: https://cloud.google.com/tasks/docs/reference/rest - rpc_documentation: https://cloud.google.com/tasks/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/tasks/v2 - - proto_path: google/cloud/tasks/v2beta2 - - proto_path: google/cloud/tasks/v2beta3 -- api_shortname: telcoautomation - name_pretty: Telco Automation API - product_documentation: https://cloud.google.com/telecom-network-automation - api_description: APIs to automate 5G deployment and management of cloud infrastructure - and network functions. - release_level: stable - GAPICs: - - proto_path: google/cloud/telcoautomation/v1 - - proto_path: google/cloud/telcoautomation/v1alpha1 -- api_shortname: texttospeech - name_pretty: Cloud Text-to-Speech - product_documentation: https://cloud.google.com/text-to-speech - api_description: enables easy integration of Google text recognition technologies - into developer applications. Send text and receive synthesized audio output from - the Cloud Text-to-Speech API service. - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/5235428 - rest_documentation: https://cloud.google.com/text-to-speech/docs/reference/rest - rpc_documentation: https://cloud.google.com/text-to-speech/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/texttospeech/v1 - - proto_path: google/cloud/texttospeech/v1beta1 -- api_shortname: tpu - name_pretty: Cloud TPU - product_documentation: https://cloud.google.com/tpu/docs - api_description: are Google's custom-developed application-specific integrated circuits - (ASICs) used to accelerate machine learning workloads. - release_level: stable - rest_documentation: https://cloud.google.com/tpu/docs/reference/rest - GAPICs: - - proto_path: google/cloud/tpu/v1 - - proto_path: google/cloud/tpu/v2 - - proto_path: google/cloud/tpu/v2alpha1 -- api_shortname: cloudtrace - name_pretty: Stackdriver Trace - product_documentation: https://cloud.google.com/trace/docs/ - api_description: is a distributed tracing system that collects latency data from - your applications and displays it in the Google Cloud Platform Console. You can - track how requests propagate through your application and receive detailed near - real-time performance insights. - library_name: trace - release_level: stable - requires_billing: false - GAPICs: - - proto_path: google/devtools/cloudtrace/v1 - - proto_path: google/devtools/cloudtrace/v2 -- api_shortname: translate - name_pretty: Cloud Translation - product_documentation: https://cloud.google.com/translate/docs/ - api_description: can dynamically translate text between thousands of language pairs. - Translation lets websites and programs programmatically integrate with the translation - service. - release_level: stable - api_id: translate.googleapis.com - issue_tracker: https://issuetracker.google.com/savedsearches/559749 - rest_documentation: https://cloud.google.com/translate/docs/reference/rest - rpc_documentation: https://cloud.google.com/translate/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/translate/v3 - - proto_path: google/cloud/translate/v3beta1 -- api_shortname: memorystore - name_pretty: Memorystore API - product_documentation: https://cloud.google.com/memorystore/docs/valkey - api_description: Memorystore for Valkey is a fully managed Valkey Cluster service - for Google Cloud. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-memorystore/latest/overview - release_level: stable - api_id: memorystore.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - library_name: valkey - GAPICs: - - proto_path: google/cloud/memorystore/v1 - - proto_path: google/cloud/memorystore/v1beta - requires_billing: true - rest_documentation: https://cloud.google.com/memorystore/docs/valkey/reference/rest -- api_shortname: vectorsearch - name_pretty: Vector Search API - product_documentation: https://docs.cloud.google.com/vertex-ai/docs/vector-search/overview - api_description: The Vector Search API provides a fully-managed, highly performant, - and scalable vector database designed to power next-generation search, recommendation, - and generative AI applications. It allows you to store, index, and query your - data and its corresponding vector embeddings through a simple, intuitive interface. - With Vector Search, you can define custom schemas for your data, insert objects - with associated metadata, automatically generate embeddings from your data, and - perform fast approximate nearest neighbor (ANN) searches to find semantically - similar items at scale. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-vectorsearch - api_id: vectorsearch.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/vectorsearch/v1beta - - proto_path: google/cloud/vectorsearch/v1 - requires_billing: true -- api_shortname: videointelligence - name_pretty: Cloud Video Intelligence - product_documentation: https://cloud.google.com/video-intelligence/docs/ - api_description: allows developers to use Google video analysis technology as part - of their applications. - library_name: video-intelligence - release_level: stable - issue_tracker: https://issuetracker.google.com/savedsearches/5084810 - rest_documentation: https://cloud.google.com/video-intelligence/docs/reference/rest - rpc_documentation: https://cloud.google.com/video-intelligence/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/videointelligence/v1 - - proto_path: google/cloud/videointelligence/v1beta2 - - proto_path: google/cloud/videointelligence/v1p1beta1 - - proto_path: google/cloud/videointelligence/v1p2beta1 - - proto_path: google/cloud/videointelligence/v1p3beta1 -- api_shortname: livestream - name_pretty: Live Stream API - product_documentation: https://cloud.google.com/livestream/ - api_description: transcodes mezzanine live signals into direct-to-consumer streaming - formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and - HTTP Live Streaming (HLS), for multiple device platforms. - library_name: video-live-stream - distribution_name: com.google.cloud:google-cloud-live-stream - GAPICs: - - proto_path: google/cloud/video/livestream/v1 -- api_shortname: videostitcher - name_pretty: Video Stitcher API - product_documentation: https://cloud.google.com/video-stitcher/ - api_description: allows you to manipulate video content to dynamically insert ads - prior to delivery to client devices. - library_name: video-stitcher - release_level: stable - GAPICs: - - proto_path: google/cloud/video/stitcher/v1 -- api_shortname: transcoder - name_pretty: Video Transcoder - product_documentation: https://cloud.google.com/transcoder/docs - api_description: allows you to transcode videos into a variety of formats. The Transcoder - API benefits broadcasters, production companies, businesses, and individuals looking - to transform their video content for use across a variety of user devices. - library_name: video-transcoder - release_level: stable - api_id: transcoder.googleapis.com - rest_documentation: https://cloud.google.com/transcoder/docs/reference/rest - rpc_documentation: https://cloud.google.com/transcoder/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/video/transcoder/v1 -- api_shortname: vision - name_pretty: Cloud Vision - product_documentation: https://cloud.google.com/vision/docs/ - api_description: allows developers to easily integrate vision detection features - within applications, including image labeling, face and landmark detection, optical - character recognition (OCR), and tagging of explicit content. - release_level: stable - issue_tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:187174 - rest_documentation: https://cloud.google.com/vision/docs/reference/rest - rpc_documentation: https://cloud.google.com/vision/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/vision/v1 - - proto_path: google/cloud/vision/v1p1beta1 - - proto_path: google/cloud/vision/v1p2beta1 - - proto_path: google/cloud/vision/v1p3beta1 - - proto_path: google/cloud/vision/v1p4beta1 -- api_shortname: visionai - name_pretty: Vision AI API - product_documentation: https://cloud.google.com/vision-ai/docs - api_description: Vertex AI Vision is an AI-powered platform to ingest, analyze and - store video data. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-visionai - api_id: visionai.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/visionai/v1 - requires_billing: true - rpc_documentation: https://cloud.google.com/vision-ai/docs/reference/rpc -- api_shortname: vmmigration - name_pretty: VM Migration - product_documentation: n/a - api_description: helps customers migrating VMs to GCP at no additional cost, as - well as an extensive ecosystem of partners to help with discovery and assessment, - planning, migration, special use cases, and more. - release_level: stable - GAPICs: - - proto_path: google/cloud/vmmigration/v1 -- api_shortname: vmwareengine - name_pretty: Google Cloud VMware Engine - product_documentation: https://cloud.google.com/vmware-engine/ - api_description: Easily lift and shift your VMware-based applications to Google - Cloud without changes to your apps, tools, or processes. - rest_documentation: https://cloud.google.com/vmware-engine/docs/reference/rest - GAPICs: - - proto_path: google/cloud/vmwareengine/v1 -- api_shortname: vpcaccess - name_pretty: Serverless VPC Access - product_documentation: https://cloud.google.com/vpc/docs/serverless-vpc-access - api_description: enables you to connect from a serverless environment on Google - Cloud directly to your VPC network. This connection makes it possible for your - serverless environment to access resources in your VPC network via internal IP - addresses. - release_level: stable - GAPICs: - - proto_path: google/cloud/vpcaccess/v1 -- api_shortname: webrisk - name_pretty: Web Risk - product_documentation: https://cloud.google.com/web-risk/docs/ - api_description: is a Google Cloud service that lets client applications check URLs - against Google's constantly updated lists of unsafe web resources. Unsafe web - resources include social engineering sites—such as phishing and deceptive sites—and - sites that host malware or unwanted software. With the Web Risk API, you can quickly - identify known bad sites, warn users before they click infected links, and prevent - users from posting links to known infected pages from your site. The Web Risk - API includes data on more than a million unsafe URLs and stays up to date by examining - billions of URLs each day. - release_level: stable - requires_billing: false - issue_tracker: '' - rest_documentation: https://cloud.google.com/web-risk/docs/reference/rest - rpc_documentation: https://cloud.google.com/web-risk/docs/reference/rpc - GAPICs: - - proto_path: google/cloud/webrisk/v1 - - proto_path: google/cloud/webrisk/v1beta1 -- api_shortname: websecurityscanner - name_pretty: Cloud Security Scanner - product_documentation: https://cloud.google.com/security-scanner/docs/ - api_description: identifies security vulnerabilities in your App Engine, Compute - Engine, and Google Kubernetes Engine web applications. It crawls your application, - following all links within the scope of your starting URLs, and attempts to exercise - as many user inputs and event handlers as possible. - release_level: stable - requires_billing: false - issue_tracker: https://issuetracker.google.com/savedsearches/559748 - GAPICs: - - proto_path: google/cloud/websecurityscanner/v1 - - proto_path: google/cloud/websecurityscanner/v1alpha - - proto_path: google/cloud/websecurityscanner/v1beta -- api_shortname: workflowexecutions - name_pretty: Cloud Workflow Executions - product_documentation: https://cloud.google.com/workflows - api_description: allows you to ochestrate and automate Google Cloud and HTTP-based - API services with serverless workflows. - library_name: workflow-executions - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/workflows/docs/reference/rest - GAPICs: - - proto_path: google/cloud/workflows/executions/v1 - - proto_path: google/cloud/workflows/executions/v1beta -- api_shortname: workflows - name_pretty: Cloud Workflows - product_documentation: https://cloud.google.com/workflows - api_description: allows you to ochestrate and automate Google Cloud and HTTP-based - API services with serverless workflows. - release_level: stable - codeowner_team: '@googleapis/aap-dpes' - rest_documentation: https://cloud.google.com/workflows/docs/reference/rest - GAPICs: - - proto_path: google/cloud/workflows/v1 - - proto_path: google/cloud/workflows/v1beta -- api_shortname: workloadmanager - name_pretty: Workload Manager API - product_documentation: https://docs.cloud.google.com/workload-manager/docs - api_description: Workload Manager is a service that provides tooling for enterprise - workloads to automate the deployment and validation of your workloads against - best practices and recommendations. - client_documentation: - https://cloud.google.com/java/docs/reference/google-cloud-workloadmanager/latest/overview - release_level: preview - distribution_name: com.google.cloud:google-cloud-workloadmanager - api_id: workloadmanager.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.cloud - cloud_api: true - GAPICs: - - proto_path: google/cloud/workloadmanager/v1 - requires_billing: true - rpc_documentation: https://docs.cloud.google.com/workload-manager/docs/reference/rest -- api_shortname: workspaceevents - name_pretty: Google Workspace Events API - product_documentation: https://developers.google.com/workspace/events - api_description: The Google Workspace Events API lets you subscribe to events and - manage change notifications across Google Workspace applications. - rest_documentation: https://developers.google.com/workspace/events/reference/rest - GAPICs: - - proto_path: google/apps/events/subscriptions/v1 - - proto_path: google/apps/events/subscriptions/v1beta -- api_shortname: workstations - name_pretty: Cloud Workstations - product_documentation: https://cloud.google.com/workstations - api_description: Fully managed development environments built to meet the needs - of security-sensitive enterprises. It enhances the security of development environments - while accelerating developer onboarding and productivity. - rest_documentation: https://cloud.google.com/workstations/docs/reference/rest - rpc_documentation: https://cloud.google.com/workstations/docs/reference/rpc - release_level: stable - GAPICs: - - proto_path: google/cloud/workstations/v1 - - proto_path: google/cloud/workstations/v1beta - diff --git a/java-common-iam/.OwlBot-hermetic.yaml b/java-common-iam/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..ebae7a04996e --- /dev/null +++ b/java-common-iam/.OwlBot-hermetic.yaml @@ -0,0 +1,36 @@ +# Copyright 2024 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. + + +deep-remove-regex: +- "/java-common-iam/grpc-google-.*/src" +- "/java-common-iam/proto-google-.*/src" +- "/java-common-iam/google-.*/src" +- "/java-common-iam/samples/snippets/generated" + +deep-preserve-regex: +- "/java-common-iam/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" +- "/.*google-.*/src/main/java/.*/stub/Version.java" + +deep-copy-regex: +- source: "/google/iam/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-common-iam/$1/proto-proto-google-iam-v1-$1/src" +- source: "/google/iam/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-common-iam/$1/grpc-proto-google-iam-v1-$1/src" +- source: "/google/iam/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-common-iam/$1/proto-google-iam-v1/src" +- source: "/google/iam/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-common-iam/$1/samples/snippets/generated" + +api-name: common-iam \ No newline at end of file diff --git a/java-common-iam/.repo-metadata.json b/java-common-iam/.repo-metadata.json new file mode 100644 index 000000000000..6274a9c0d2ac --- /dev/null +++ b/java-common-iam/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "common-iam", + "name_pretty": "IAM", + "product_documentation": "https://cloud.google.com/iam", + "api_description": "Manages access control for Google Cloud Platform resources", + "client_documentation": "https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/overview", + "release_level": "stable", + "transport": "both", + "language": "java", + "repo": "googleapis/sdk-platform-java", + "repo_short": "java-common-iam", + "distribution_name": "com.google.api.grpc:proto-google-iam-v1", + "library_type": "OTHER", + "requires_billing": true, + "excluded_dependencies": "grpc-google-iam-v1", + "excluded_poms": "proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1" +} \ No newline at end of file diff --git a/java-common-iam/README.md b/java-common-iam/README.md new file mode 100644 index 000000000000..f122d93fe660 --- /dev/null +++ b/java-common-iam/README.md @@ -0,0 +1,176 @@ +# Google IAM Client for Java + +Java idiomatic client for [IAM][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + + +```xml + + com.google.api.grpc + proto-google-iam-v1 + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.api.grpc:proto-google-iam-v1:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.api.grpc" % "proto-google-iam-v1" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired IAM APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the IAM API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the IAM [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google IAM. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `proto-google-iam-v1` library. See the [Quickstart](#quickstart) section +to add `proto-google-iam-v1` as a dependency in your code. + +## About IAM + + +[IAM][product-docs] Manages access control for Google Cloud Platform resources + +See the [IAM client library docs][javadocs] to learn how to +use this IAM Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +IAM uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/iam +[javadocs]: https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/overview +[stability-image]: https://img.shields.io/badge/stability-stable-green +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.api.grpc/proto-google-iam-v1.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.api.grpc/proto-google-iam-v1/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/sdk-platform-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/sdk-platform-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/sdk-platform-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing + +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-common-iam/grpc-proto-google-iam-v1-v1/pom.xml b/java-common-iam/grpc-proto-google-iam-v1-v1/pom.xml new file mode 100644 index 000000000000..98d4304c4322 --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v1 + 1.65.0 + grpc-proto-google-iam-v1-v1 + GRPC library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v1 + + + com.google.guava + guava + + + diff --git a/java-common-iam/grpc-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java new file mode 100644 index 000000000000..919d8b73ee8f --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java @@ -0,0 +1,813 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API Overview
+ * Manages Identity and Access Management (IAM) policies.
+ * Any implementation of an API that offers access control features
+ * implements the google.iam.v1.IAMPolicy interface.
+ * ## Data model
+ * Access control is applied when a principal (user or service account), takes
+ * some action on a resource exposed by a service. Resources, identified by
+ * URI-like names, are the unit of access control specification. Service
+ * implementations can choose the granularity of access control and the
+ * supported permissions for their resources.
+ * For example one database service may allow access control to be
+ * specified only at the Table level, whereas another might allow access control
+ * to also be specified at the Column level.
+ * ## Policy Structure
+ * See google.iam.v1.Policy
+ * This is intentionally not a CRUD style API because access control policies
+ * are created and deleted implicitly with the resources to which they are
+ * attached.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class IAMPolicyGrpc { + + private IAMPolicyGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v1.IAMPolicy"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = IAMPolicyGrpc.getSetIamPolicyMethod) == null) { + synchronized (IAMPolicyGrpc.class) { + if ((getSetIamPolicyMethod = IAMPolicyGrpc.getSetIamPolicyMethod) == null) { + IAMPolicyGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new IAMPolicyMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = IAMPolicyGrpc.getGetIamPolicyMethod) == null) { + synchronized (IAMPolicyGrpc.class) { + if ((getGetIamPolicyMethod = IAMPolicyGrpc.getGetIamPolicyMethod) == null) { + IAMPolicyGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new IAMPolicyMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", + requestType = com.google.iam.v1.TestIamPermissionsRequest.class, + responseType = com.google.iam.v1.TestIamPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + if ((getTestIamPermissionsMethod = IAMPolicyGrpc.getTestIamPermissionsMethod) == null) { + synchronized (IAMPolicyGrpc.class) { + if ((getTestIamPermissionsMethod = IAMPolicyGrpc.getTestIamPermissionsMethod) == null) { + IAMPolicyGrpc.getTestIamPermissionsMethod = + getTestIamPermissionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new IAMPolicyMethodDescriptorSupplier("TestIamPermissions")) + .build(); + } + } + } + return getTestIamPermissionsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static IAMPolicyStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IAMPolicyStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyStub(channel, callOptions); + } + }; + return IAMPolicyStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static IAMPolicyBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IAMPolicyBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyBlockingV2Stub(channel, callOptions); + } + }; + return IAMPolicyBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static IAMPolicyBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IAMPolicyBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyBlockingStub(channel, callOptions); + } + }; + return IAMPolicyBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static IAMPolicyFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IAMPolicyFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyFutureStub(channel, callOptions); + } + }; + return IAMPolicyFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Sets the access control policy on the specified resource. Replaces any
+     * existing policy.
+     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+     * 
+ */ + default void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy for a resource.
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * 
+ */ + default void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + default void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTestIamPermissionsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service IAMPolicy. + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public abstract static class IAMPolicyImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return IAMPolicyGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service IAMPolicy. + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public static final class IAMPolicyStub extends io.grpc.stub.AbstractAsyncStub { + private IAMPolicyStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IAMPolicyStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyStub(channel, callOptions); + } + + /** + * + * + *
+     * Sets the access control policy on the specified resource. Replaces any
+     * existing policy.
+     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+     * 
+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy for a resource.
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * 
+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service IAMPolicy. + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public static final class IAMPolicyBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private IAMPolicyBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IAMPolicyBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Sets the access control policy on the specified resource. Replaces any
+     * existing policy.
+     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the access control policy for a resource.
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service IAMPolicy. + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public static final class IAMPolicyBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private IAMPolicyBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IAMPolicyBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Sets the access control policy on the specified resource. Replaces any
+     * existing policy.
+     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the access control policy for a resource.
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service IAMPolicy. + * + *
+   * API Overview
+   * Manages Identity and Access Management (IAM) policies.
+   * Any implementation of an API that offers access control features
+   * implements the google.iam.v1.IAMPolicy interface.
+   * ## Data model
+   * Access control is applied when a principal (user or service account), takes
+   * some action on a resource exposed by a service. Resources, identified by
+   * URI-like names, are the unit of access control specification. Service
+   * implementations can choose the granularity of access control and the
+   * supported permissions for their resources.
+   * For example one database service may allow access control to be
+   * specified only at the Table level, whereas another might allow access control
+   * to also be specified at the Column level.
+   * ## Policy Structure
+   * See google.iam.v1.Policy
+   * This is intentionally not a CRUD style API because access control policies
+   * are created and deleted implicitly with the resources to which they are
+   * attached.
+   * 
+ */ + public static final class IAMPolicyFutureStub + extends io.grpc.stub.AbstractFutureStub { + private IAMPolicyFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IAMPolicyFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IAMPolicyFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Sets the access control policy on the specified resource. Replaces any
+     * existing policy.
+     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the access control policy for a resource.
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v1.TestIamPermissionsResponse> + testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SET_IAM_POLICY = 0; + private static final int METHODID_GET_IAM_POLICY = 1; + private static final int METHODID_TEST_IAM_PERMISSIONS = 2; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TEST_IAM_PERMISSIONS: + serviceImpl.testIamPermissions( + (com.google.iam.v1.TestIamPermissionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_SET_IAM_POLICY))) + .addMethod( + getGetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_GET_IAM_POLICY))) + .addMethod( + getTestIamPermissionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse>( + service, METHODID_TEST_IAM_PERMISSIONS))) + .build(); + } + + private abstract static class IAMPolicyBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + IAMPolicyBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v1.IamPolicyProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("IAMPolicy"); + } + } + + private static final class IAMPolicyFileDescriptorSupplier + extends IAMPolicyBaseDescriptorSupplier { + IAMPolicyFileDescriptorSupplier() {} + } + + private static final class IAMPolicyMethodDescriptorSupplier + extends IAMPolicyBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + IAMPolicyMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (IAMPolicyGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new IAMPolicyFileDescriptorSupplier()) + .addMethod(getSetIamPolicyMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getTestIamPermissionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v2/pom.xml b/java-common-iam/grpc-proto-google-iam-v1-v2/pom.xml new file mode 100644 index 000000000000..7b679148c545 --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v2/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v2 + 1.65.0 + grpc-proto-google-iam-v1-v2 + GRPC library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2 + + + com.google.guava + guava + + + diff --git a/java-common-iam/grpc-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java new file mode 100644 index 000000000000..66dd2a2ca924 --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java @@ -0,0 +1,931 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An interface for managing Identity and Access Management (IAM) policies.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PoliciesGrpc { + + private PoliciesGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v2.Policies"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> + getListPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicies", + requestType = com.google.iam.v2.ListPoliciesRequest.class, + responseType = com.google.iam.v2.ListPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> + getListPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> + getListPoliciesMethod; + if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { + PoliciesGrpc.getListPoliciesMethod = + getListPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.ListPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.ListPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("ListPolicies")) + .build(); + } + } + } + return getListPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2.GetPolicyRequest, com.google.iam.v2.Policy> + getGetPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicy", + requestType = com.google.iam.v2.GetPolicyRequest.class, + responseType = com.google.iam.v2.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2.GetPolicyRequest, com.google.iam.v2.Policy> + getGetPolicyMethod() { + io.grpc.MethodDescriptor + getGetPolicyMethod; + if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { + PoliciesGrpc.getGetPolicyMethod = + getGetPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.Policy.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("GetPolicy")) + .build(); + } + } + } + return getGetPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicy", + requestType = com.google.iam.v2.CreatePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod; + if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { + PoliciesGrpc.getCreatePolicyMethod = + getCreatePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.CreatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("CreatePolicy")) + .build(); + } + } + } + return getCreatePolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", + requestType = com.google.iam.v2.UpdatePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod; + if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { + PoliciesGrpc.getUpdatePolicyMethod = + getUpdatePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("UpdatePolicy")) + .build(); + } + } + } + return getUpdatePolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicy", + requestType = com.google.iam.v2.DeletePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod; + if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { + PoliciesGrpc.getDeletePolicyMethod = + getDeletePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2.DeletePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("DeletePolicy")) + .build(); + } + } + } + return getDeletePolicyMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PoliciesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesStub(channel, callOptions); + } + }; + return PoliciesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PoliciesBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingV2Stub(channel, callOptions); + } + }; + return PoliciesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PoliciesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingStub(channel, callOptions); + } + }; + return PoliciesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PoliciesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesFutureStub(channel, callOptions); + } + }; + return PoliciesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + default void listPolicies( + com.google.iam.v2.ListPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + default void getPolicy( + com.google.iam.v2.GetPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + default void createPolicy( + com.google.iam.v2.CreatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + default void updatePolicy( + com.google.iam.v2.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + default void deletePolicy( + com.google.iam.v2.DeletePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public abstract static class PoliciesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PoliciesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesStub extends io.grpc.stub.AbstractAsyncStub { + private PoliciesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public void listPolicies( + com.google.iam.v2.ListPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public void getPolicy( + com.google.iam.v2.GetPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public void createPolicy( + com.google.iam.v2.CreatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public void updatePolicy( + com.google.iam.v2.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public void deletePolicy( + com.google.iam.v2.DeletePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PoliciesBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.iam.v2.ListPoliciesResponse listPolicies( + com.google.iam.v2.ListPoliciesRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.iam.v2.Policy getPolicy(com.google.iam.v2.GetPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.longrunning.Operation createPolicy( + com.google.iam.v2.CreatePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicy( + com.google.iam.v2.UpdatePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicy( + com.google.iam.v2.DeletePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PoliciesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.iam.v2.ListPoliciesResponse listPolicies( + com.google.iam.v2.ListPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.iam.v2.Policy getPolicy(com.google.iam.v2.GetPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.longrunning.Operation createPolicy( + com.google.iam.v2.CreatePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicy( + com.google.iam.v2.UpdatePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicy( + com.google.iam.v2.DeletePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PoliciesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v2.ListPoliciesResponse> + listPolicies(com.google.iam.v2.ListPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getPolicy( + com.google.iam.v2.GetPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicy(com.google.iam.v2.CreatePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePolicy(com.google.iam.v2.UpdatePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicy(com.google.iam.v2.DeletePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_POLICIES = 0; + private static final int METHODID_GET_POLICY = 1; + private static final int METHODID_CREATE_POLICY = 2; + private static final int METHODID_UPDATE_POLICY = 3; + private static final int METHODID_DELETE_POLICY = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_POLICIES: + serviceImpl.listPolicies( + (com.google.iam.v2.ListPoliciesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_POLICY: + serviceImpl.getPolicy( + (com.google.iam.v2.GetPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_POLICY: + serviceImpl.createPolicy( + (com.google.iam.v2.CreatePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY: + serviceImpl.updatePolicy( + (com.google.iam.v2.UpdatePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY: + serviceImpl.deletePolicy( + (com.google.iam.v2.DeletePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse>( + service, METHODID_LIST_POLICIES))) + .addMethod( + getGetPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_GET_POLICY))) + .addMethod( + getCreatePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_CREATE_POLICY))) + .addMethod( + getUpdatePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_UPDATE_POLICY))) + .addMethod( + getDeletePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_DELETE_POLICY))) + .build(); + } + + private abstract static class PoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PoliciesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v2.PolicyProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Policies"); + } + } + + private static final class PoliciesFileDescriptorSupplier extends PoliciesBaseDescriptorSupplier { + PoliciesFileDescriptorSupplier() {} + } + + private static final class PoliciesMethodDescriptorSupplier extends PoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PoliciesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PoliciesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PoliciesFileDescriptorSupplier()) + .addMethod(getListPoliciesMethod()) + .addMethod(getGetPolicyMethod()) + .addMethod(getCreatePolicyMethod()) + .addMethod(getUpdatePolicyMethod()) + .addMethod(getDeletePolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v2beta/pom.xml b/java-common-iam/grpc-proto-google-iam-v1-v2beta/pom.xml new file mode 100644 index 000000000000..722b437bf63a --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v2beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v2beta + 1.65.0 + grpc-proto-google-iam-v1-v2beta + GRPC library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2beta + + + com.google.guava + guava + + + diff --git a/java-common-iam/grpc-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java new file mode 100644 index 000000000000..0f80061851b3 --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java @@ -0,0 +1,933 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v2beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An interface for managing Identity and Access Management (IAM) policies.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PoliciesGrpc { + + private PoliciesGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v2beta.Policies"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> + getListPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicies", + requestType = com.google.iam.v2beta.ListPoliciesRequest.class, + responseType = com.google.iam.v2beta.ListPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> + getListPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> + getListPoliciesMethod; + if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { + PoliciesGrpc.getListPoliciesMethod = + getListPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("ListPolicies")) + .build(); + } + } + } + return getListPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy> + getGetPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicy", + requestType = com.google.iam.v2beta.GetPolicyRequest.class, + responseType = com.google.iam.v2beta.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy> + getGetPolicyMethod() { + io.grpc.MethodDescriptor + getGetPolicyMethod; + if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { + PoliciesGrpc.getGetPolicyMethod = + getGetPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.Policy.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("GetPolicy")) + .build(); + } + } + } + return getGetPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicy", + requestType = com.google.iam.v2beta.CreatePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> + getCreatePolicyMethod; + if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { + PoliciesGrpc.getCreatePolicyMethod = + getCreatePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("CreatePolicy")) + .build(); + } + } + } + return getCreatePolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", + requestType = com.google.iam.v2beta.UpdatePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> + getUpdatePolicyMethod; + if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { + PoliciesGrpc.getUpdatePolicyMethod = + getUpdatePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("UpdatePolicy")) + .build(); + } + } + } + return getUpdatePolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicy", + requestType = com.google.iam.v2beta.DeletePolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> + getDeletePolicyMethod; + if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { + synchronized (PoliciesGrpc.class) { + if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { + PoliciesGrpc.getDeletePolicyMethod = + getDeletePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("DeletePolicy")) + .build(); + } + } + } + return getDeletePolicyMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PoliciesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesStub(channel, callOptions); + } + }; + return PoliciesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PoliciesBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingV2Stub(channel, callOptions); + } + }; + return PoliciesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PoliciesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingStub(channel, callOptions); + } + }; + return PoliciesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PoliciesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PoliciesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesFutureStub(channel, callOptions); + } + }; + return PoliciesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + default void listPolicies( + com.google.iam.v2beta.ListPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + default void getPolicy( + com.google.iam.v2beta.GetPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + default void createPolicy( + com.google.iam.v2beta.CreatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + default void updatePolicy( + com.google.iam.v2beta.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + default void deletePolicy( + com.google.iam.v2beta.DeletePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public abstract static class PoliciesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PoliciesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesStub extends io.grpc.stub.AbstractAsyncStub { + private PoliciesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public void listPolicies( + com.google.iam.v2beta.ListPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public void getPolicy( + com.google.iam.v2beta.GetPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public void createPolicy( + com.google.iam.v2beta.CreatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public void updatePolicy( + com.google.iam.v2beta.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public void deletePolicy( + com.google.iam.v2beta.DeletePolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PoliciesBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.iam.v2beta.ListPoliciesResponse listPolicies( + com.google.iam.v2beta.ListPoliciesRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.iam.v2beta.Policy getPolicy(com.google.iam.v2beta.GetPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.longrunning.Operation createPolicy( + com.google.iam.v2beta.CreatePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicy( + com.google.iam.v2beta.UpdatePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicy( + com.google.iam.v2beta.DeletePolicyRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PoliciesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.iam.v2beta.ListPoliciesResponse listPolicies( + com.google.iam.v2beta.ListPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.iam.v2beta.Policy getPolicy(com.google.iam.v2beta.GetPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.longrunning.Operation createPolicy( + com.google.iam.v2beta.CreatePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicy( + com.google.iam.v2beta.UpdatePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicy( + com.google.iam.v2beta.DeletePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Policies. + * + *
+   * An interface for managing Identity and Access Management (IAM) policies.
+   * 
+ */ + public static final class PoliciesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PoliciesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PoliciesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PoliciesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves the policies of the specified kind that are attached to a
+     * resource.
+     * The response lists only policy metadata. In particular, policy rules are
+     * omitted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v2beta.ListPoliciesResponse> + listPolicies(com.google.iam.v2beta.ListPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getPolicy(com.google.iam.v2beta.GetPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicy(com.google.iam.v2beta.CreatePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified policy.
+     * You can update only the rules and the display name for the policy.
+     * To update a policy, you should use a read-modify-write loop:
+     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
+     * 2. Modify the policy as needed.
+     * 3. Use `UpdatePolicy` to write the updated policy.
+     * This pattern helps prevent conflicts between concurrent updates.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePolicy(com.google.iam.v2beta.UpdatePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a policy. This action is permanent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicy(com.google.iam.v2beta.DeletePolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_POLICIES = 0; + private static final int METHODID_GET_POLICY = 1; + private static final int METHODID_CREATE_POLICY = 2; + private static final int METHODID_UPDATE_POLICY = 3; + private static final int METHODID_DELETE_POLICY = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_POLICIES: + serviceImpl.listPolicies( + (com.google.iam.v2beta.ListPoliciesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_POLICY: + serviceImpl.getPolicy( + (com.google.iam.v2beta.GetPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_POLICY: + serviceImpl.createPolicy( + (com.google.iam.v2beta.CreatePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY: + serviceImpl.updatePolicy( + (com.google.iam.v2beta.UpdatePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY: + serviceImpl.deletePolicy( + (com.google.iam.v2beta.DeletePolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2beta.ListPoliciesRequest, + com.google.iam.v2beta.ListPoliciesResponse>(service, METHODID_LIST_POLICIES))) + .addMethod( + getGetPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy>( + service, METHODID_GET_POLICY))) + .addMethod( + getCreatePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_CREATE_POLICY))) + .addMethod( + getUpdatePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_UPDATE_POLICY))) + .addMethod( + getDeletePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation>( + service, METHODID_DELETE_POLICY))) + .build(); + } + + private abstract static class PoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PoliciesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v2beta.PolicyProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Policies"); + } + } + + private static final class PoliciesFileDescriptorSupplier extends PoliciesBaseDescriptorSupplier { + PoliciesFileDescriptorSupplier() {} + } + + private static final class PoliciesMethodDescriptorSupplier extends PoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PoliciesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PoliciesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PoliciesFileDescriptorSupplier()) + .addMethod(getListPoliciesMethod()) + .addMethod(getGetPolicyMethod()) + .addMethod(getCreatePolicyMethod()) + .addMethod(getUpdatePolicyMethod()) + .addMethod(getDeletePolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3/pom.xml b/java-common-iam/grpc-proto-google-iam-v1-v3/pom.xml new file mode 100644 index 000000000000..fbbd5b6fec4d --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v3 + 1.65.0 + grpc-proto-google-iam-v1-v3 + GRPC library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3 + + + com.google.guava + guava + + + diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsGrpc.java new file mode 100644 index 000000000000..0fa2f555a51d --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsGrpc.java @@ -0,0 +1,1111 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An interface for managing Identity and Access Management (IAM) policy
+ * bindings.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PolicyBindingsGrpc { + + private PolicyBindingsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v3.PolicyBindings"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicyBinding", + requestType = com.google.iam.v3.CreatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getCreatePolicyBindingMethod = + getCreatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.CreatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("CreatePolicyBinding")) + .build(); + } + } + } + return getCreatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.GetPolicyBindingRequest, com.google.iam.v3.PolicyBinding> + getGetPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicyBinding", + requestType = com.google.iam.v3.GetPolicyBindingRequest.class, + responseType = com.google.iam.v3.PolicyBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.GetPolicyBindingRequest, com.google.iam.v3.PolicyBinding> + getGetPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.GetPolicyBindingRequest, com.google.iam.v3.PolicyBinding> + getGetPolicyBindingMethod; + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + PolicyBindingsGrpc.getGetPolicyBindingMethod = + getGetPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.GetPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.PolicyBinding.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("GetPolicyBinding")) + .build(); + } + } + } + return getGetPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicyBinding", + requestType = com.google.iam.v3.UpdatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getUpdatePolicyBindingMethod = + getUpdatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.UpdatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("UpdatePolicyBinding")) + .build(); + } + } + } + return getUpdatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicyBinding", + requestType = com.google.iam.v3.DeletePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getDeletePolicyBindingMethod = + getDeletePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.DeletePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("DeletePolicyBinding")) + .build(); + } + } + } + return getDeletePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.ListPolicyBindingsRequest, com.google.iam.v3.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicyBindings", + requestType = com.google.iam.v3.ListPolicyBindingsRequest.class, + responseType = com.google.iam.v3.ListPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.ListPolicyBindingsRequest, com.google.iam.v3.ListPolicyBindingsResponse> + getListPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.ListPolicyBindingsRequest, + com.google.iam.v3.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getListPolicyBindingsMethod = + getListPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.ListPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.ListPolicyBindingsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("ListPolicyBindings")) + .build(); + } + } + } + return getListPolicyBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.SearchTargetPolicyBindingsRequest, + com.google.iam.v3.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchTargetPolicyBindings", + requestType = com.google.iam.v3.SearchTargetPolicyBindingsRequest.class, + responseType = com.google.iam.v3.SearchTargetPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.SearchTargetPolicyBindingsRequest, + com.google.iam.v3.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.SearchTargetPolicyBindingsRequest, + com.google.iam.v3.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod = + getSearchTargetPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchTargetPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.SearchTargetPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.SearchTargetPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("SearchTargetPolicyBindings")) + .build(); + } + } + } + return getSearchTargetPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyBindingsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + }; + return PolicyBindingsStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PolicyBindingsBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + }; + return PolicyBindingsBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyBindingsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + }; + return PolicyBindingsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyBindingsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + }; + return PolicyBindingsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + default void createPolicyBinding( + com.google.iam.v3.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + default void getPolicyBinding( + com.google.iam.v3.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + default void updatePolicyBinding( + com.google.iam.v3.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + default void deletePolicyBinding( + com.google.iam.v3.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + default void listPolicyBindings( + com.google.iam.v3.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPolicyBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + default void searchTargetPolicyBindings( + com.google.iam.v3.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchTargetPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public abstract static class PolicyBindingsImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PolicyBindingsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyBindingsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public void createPolicyBinding( + com.google.iam.v3.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public void getPolicyBinding( + com.google.iam.v3.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public void updatePolicyBinding( + com.google.iam.v3.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public void deletePolicyBinding( + com.google.iam.v3.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public void listPolicyBindings( + com.google.iam.v3.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public void searchTargetPolicyBindings( + com.google.iam.v3.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3.CreatePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3.PolicyBinding getPolicyBinding( + com.google.iam.v3.GetPolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3.UpdatePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3.DeletePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3.ListPolicyBindingsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3.SearchTargetPolicyBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3.PolicyBinding getPolicyBinding( + com.google.iam.v3.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyBindingsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicyBinding(com.google.iam.v3.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getPolicyBinding(com.google.iam.v3.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePolicyBinding(com.google.iam.v3.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicyBinding(com.google.iam.v3.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3.ListPolicyBindingsResponse> + listPolicyBindings(com.google.iam.v3.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3.SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindings(com.google.iam.v3.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_POLICY_BINDING = 0; + private static final int METHODID_GET_POLICY_BINDING = 1; + private static final int METHODID_UPDATE_POLICY_BINDING = 2; + private static final int METHODID_DELETE_POLICY_BINDING = 3; + private static final int METHODID_LIST_POLICY_BINDINGS = 4; + private static final int METHODID_SEARCH_TARGET_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_POLICY_BINDING: + serviceImpl.createPolicyBinding( + (com.google.iam.v3.CreatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_BINDING: + serviceImpl.getPolicyBinding( + (com.google.iam.v3.GetPolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY_BINDING: + serviceImpl.updatePolicyBinding( + (com.google.iam.v3.UpdatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY_BINDING: + serviceImpl.deletePolicyBinding( + (com.google.iam.v3.DeletePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_POLICY_BINDINGS: + serviceImpl.listPolicyBindings( + (com.google.iam.v3.ListPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_TARGET_POLICY_BINDINGS: + serviceImpl.searchTargetPolicyBindings( + (com.google.iam.v3.SearchTargetPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.CreatePolicyBindingRequest, com.google.longrunning.Operation>( + service, METHODID_CREATE_POLICY_BINDING))) + .addMethod( + getGetPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.GetPolicyBindingRequest, com.google.iam.v3.PolicyBinding>( + service, METHODID_GET_POLICY_BINDING))) + .addMethod( + getUpdatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.UpdatePolicyBindingRequest, com.google.longrunning.Operation>( + service, METHODID_UPDATE_POLICY_BINDING))) + .addMethod( + getDeletePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.DeletePolicyBindingRequest, com.google.longrunning.Operation>( + service, METHODID_DELETE_POLICY_BINDING))) + .addMethod( + getListPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.ListPolicyBindingsRequest, + com.google.iam.v3.ListPolicyBindingsResponse>( + service, METHODID_LIST_POLICY_BINDINGS))) + .addMethod( + getSearchTargetPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.SearchTargetPolicyBindingsRequest, + com.google.iam.v3.SearchTargetPolicyBindingsResponse>( + service, METHODID_SEARCH_TARGET_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyBindingsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyBindings"); + } + } + + private static final class PolicyBindingsFileDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier { + PolicyBindingsFileDescriptorSupplier() {} + } + + private static final class PolicyBindingsMethodDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PolicyBindingsMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyBindingsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PolicyBindingsFileDescriptorSupplier()) + .addMethod(getCreatePolicyBindingMethod()) + .addMethod(getGetPolicyBindingMethod()) + .addMethod(getUpdatePolicyBindingMethod()) + .addMethod(getDeletePolicyBindingMethod()) + .addMethod(getListPolicyBindingsMethod()) + .addMethod(getSearchTargetPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesGrpc.java new file mode 100644 index 000000000000..9aa2dceec210 --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesGrpc.java @@ -0,0 +1,1181 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages Identity and Access Management (IAM) principal access boundary
+ * policies.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PrincipalAccessBoundaryPoliciesGrpc { + + private PrincipalAccessBoundaryPoliciesGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.iam.v3.PrincipalAccessBoundaryPolicies"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod = + getCreatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "CreatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "CreatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getCreatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.iam.v3.PrincipalAccessBoundaryPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod = + getGetPrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetPrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "GetPrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getGetPrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod = + getUpdatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "UpdatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "UpdatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getUpdatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod = + getDeletePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "DeletePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "DeletePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getDeletePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPrincipalAccessBoundaryPolicies", + requestType = com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.class, + responseType = com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod = + getListPrincipalAccessBoundaryPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "ListPrincipalAccessBoundaryPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "ListPrincipalAccessBoundaryPolicies")) + .build(); + } + } + } + return getListPrincipalAccessBoundaryPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchPrincipalAccessBoundaryPolicyBindings", + requestType = com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + responseType = com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "SearchPrincipalAccessBoundaryPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "SearchPrincipalAccessBoundaryPolicyBindings")) + .build(); + } + } + } + return getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PrincipalAccessBoundaryPoliciesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PrincipalAccessBoundaryPoliciesBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PrincipalAccessBoundaryPoliciesBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PrincipalAccessBoundaryPoliciesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + default void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + default void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + default void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + default void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + default void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPrincipalAccessBoundaryPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + default void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public abstract static class PrincipalAccessBoundaryPoliciesImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PrincipalAccessBoundaryPoliciesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesStub + extends io.grpc.stub.AbstractAsyncStub { + private PrincipalAccessBoundaryPoliciesStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PrincipalAccessBoundaryPoliciesFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPrincipalAccessBoundaryPolicy( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3.PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicy( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 0; + private static final int METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 1; + private static final int METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 2; + private static final int METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 3; + private static final int METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES = 4; + private static final int METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.createPrincipalAccessBoundaryPolicy( + (com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.getPrincipalAccessBoundaryPolicy( + (com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.updatePrincipalAccessBoundaryPolicy( + (com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.deletePrincipalAccessBoundaryPolicy( + (com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES: + serviceImpl.listPrincipalAccessBoundaryPolicies( + (com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse>) + responseObserver); + break; + case METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS: + serviceImpl.searchPrincipalAccessBoundaryPolicyBindings( + (com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getGetPrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3.PrincipalAccessBoundaryPolicy>( + service, METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getUpdatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getDeletePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getListPrincipalAccessBoundaryPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse>( + service, METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES))) + .addMethod( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse>( + service, METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PrincipalAccessBoundaryPolicies"); + } + } + + private static final class PrincipalAccessBoundaryPoliciesFileDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier { + PrincipalAccessBoundaryPoliciesFileDescriptorSupplier() {} + } + + private static final class PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesFileDescriptorSupplier()) + .addMethod(getCreatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getGetPrincipalAccessBoundaryPolicyMethod()) + .addMethod(getUpdatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getDeletePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getListPrincipalAccessBoundaryPoliciesMethod()) + .addMethod(getSearchPrincipalAccessBoundaryPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3beta/pom.xml b/java-common-iam/grpc-proto-google-iam-v1-v3beta/pom.xml new file mode 100644 index 000000000000..414e62ffb58c --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v3beta + 1.65.0 + grpc-proto-google-iam-v1-v3beta + GRPC library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3beta + + + com.google.guava + guava + + + diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java new file mode 100644 index 000000000000..9fde0cbfe76d --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v3beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An interface for managing Identity and Access Management (IAM) policy
+ * bindings.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PolicyBindingsGrpc { + + private PolicyBindingsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v3beta.PolicyBindings"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicyBinding", + requestType = com.google.iam.v3beta.CreatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getCreatePolicyBindingMethod = + getCreatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.CreatePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("CreatePolicyBinding")) + .build(); + } + } + } + return getCreatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicyBinding", + requestType = com.google.iam.v3beta.GetPolicyBindingRequest.class, + responseType = com.google.iam.v3beta.PolicyBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod; + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + PolicyBindingsGrpc.getGetPolicyBindingMethod = + getGetPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.PolicyBinding.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("GetPolicyBinding")) + .build(); + } + } + } + return getGetPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicyBinding", + requestType = com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getUpdatePolicyBindingMethod = + getUpdatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.UpdatePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("UpdatePolicyBinding")) + .build(); + } + } + } + return getUpdatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicyBinding", + requestType = com.google.iam.v3beta.DeletePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getDeletePolicyBindingMethod = + getDeletePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.DeletePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("DeletePolicyBinding")) + .build(); + } + } + } + return getDeletePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicyBindings", + requestType = com.google.iam.v3beta.ListPolicyBindingsRequest.class, + responseType = com.google.iam.v3beta.ListPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getListPolicyBindingsMethod = + getListPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("ListPolicyBindings")) + .build(); + } + } + } + return getListPolicyBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchTargetPolicyBindings", + requestType = com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + responseType = com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod = + getSearchTargetPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchTargetPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("SearchTargetPolicyBindings")) + .build(); + } + } + } + return getSearchTargetPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyBindingsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + }; + return PolicyBindingsStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PolicyBindingsBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + }; + return PolicyBindingsBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyBindingsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + }; + return PolicyBindingsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyBindingsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + }; + return PolicyBindingsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + default void createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + default void getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + default void updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + default void deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + default void listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPolicyBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + default void searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchTargetPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public abstract static class PolicyBindingsImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PolicyBindingsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyBindingsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public void createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public void getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public void updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public void deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public void listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public void searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3beta.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3beta.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyBindingsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicyBinding(com.google.iam.v3beta.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getPolicyBinding(com.google.iam.v3beta.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePolicyBinding(com.google.iam.v3beta.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicyBinding(com.google.iam.v3beta.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.ListPolicyBindingsResponse> + listPolicyBindings(com.google.iam.v3beta.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_POLICY_BINDING = 0; + private static final int METHODID_GET_POLICY_BINDING = 1; + private static final int METHODID_UPDATE_POLICY_BINDING = 2; + private static final int METHODID_DELETE_POLICY_BINDING = 3; + private static final int METHODID_LIST_POLICY_BINDINGS = 4; + private static final int METHODID_SEARCH_TARGET_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_POLICY_BINDING: + serviceImpl.createPolicyBinding( + (com.google.iam.v3beta.CreatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_BINDING: + serviceImpl.getPolicyBinding( + (com.google.iam.v3beta.GetPolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY_BINDING: + serviceImpl.updatePolicyBinding( + (com.google.iam.v3beta.UpdatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY_BINDING: + serviceImpl.deletePolicyBinding( + (com.google.iam.v3beta.DeletePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_POLICY_BINDINGS: + serviceImpl.listPolicyBindings( + (com.google.iam.v3beta.ListPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_TARGET_POLICY_BINDINGS: + serviceImpl.searchTargetPolicyBindings( + (com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.CreatePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_POLICY_BINDING))) + .addMethod( + getGetPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.GetPolicyBindingRequest, + com.google.iam.v3beta.PolicyBinding>(service, METHODID_GET_POLICY_BINDING))) + .addMethod( + getUpdatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.UpdatePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_POLICY_BINDING))) + .addMethod( + getDeletePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.DeletePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_POLICY_BINDING))) + .addMethod( + getListPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse>( + service, METHODID_LIST_POLICY_BINDINGS))) + .addMethod( + getSearchTargetPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse>( + service, METHODID_SEARCH_TARGET_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyBindingsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyBindings"); + } + } + + private static final class PolicyBindingsFileDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier { + PolicyBindingsFileDescriptorSupplier() {} + } + + private static final class PolicyBindingsMethodDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PolicyBindingsMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyBindingsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PolicyBindingsFileDescriptorSupplier()) + .addMethod(getCreatePolicyBindingMethod()) + .addMethod(getGetPolicyBindingMethod()) + .addMethod(getUpdatePolicyBindingMethod()) + .addMethod(getDeletePolicyBindingMethod()) + .addMethod(getListPolicyBindingsMethod()) + .addMethod(getSearchTargetPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java b/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java new file mode 100644 index 000000000000..0337ba81a70a --- /dev/null +++ b/java-common-iam/grpc-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java @@ -0,0 +1,1187 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +package com.google.iam.v3beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages Identity and Access Management (IAM) principal access boundary
+ * policies.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PrincipalAccessBoundaryPoliciesGrpc { + + private PrincipalAccessBoundaryPoliciesGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.iam.v3beta.PrincipalAccessBoundaryPolicies"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod = + getCreatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "CreatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "CreatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getCreatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod = + getGetPrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetPrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "GetPrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getGetPrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod = + getUpdatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "UpdatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "UpdatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getUpdatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod = + getDeletePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "DeletePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "DeletePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getDeletePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPrincipalAccessBoundaryPolicies", + requestType = com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + responseType = com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod = + getListPrincipalAccessBoundaryPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "ListPrincipalAccessBoundaryPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "ListPrincipalAccessBoundaryPolicies")) + .build(); + } + } + } + return getListPrincipalAccessBoundaryPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchPrincipalAccessBoundaryPolicyBindings", + requestType = com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + responseType = + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "SearchPrincipalAccessBoundaryPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta + .SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta + .SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "SearchPrincipalAccessBoundaryPolicyBindings")) + .build(); + } + } + } + return getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PrincipalAccessBoundaryPoliciesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PrincipalAccessBoundaryPoliciesBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PrincipalAccessBoundaryPoliciesBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PrincipalAccessBoundaryPoliciesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + default void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + default void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + default void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + default void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + default void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPrincipalAccessBoundaryPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + default void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public abstract static class PrincipalAccessBoundaryPoliciesImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PrincipalAccessBoundaryPoliciesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesStub + extends io.grpc.stub.AbstractAsyncStub { + private PrincipalAccessBoundaryPoliciesStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PrincipalAccessBoundaryPoliciesFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 0; + private static final int METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 1; + private static final int METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 2; + private static final int METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 3; + private static final int METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES = 4; + private static final int METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.createPrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.getPrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.updatePrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.deletePrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES: + serviceImpl.listPrincipalAccessBoundaryPolicies( + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse>) + responseObserver); + break; + case METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS: + serviceImpl.searchPrincipalAccessBoundaryPolicyBindings( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getGetPrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy>( + service, METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getUpdatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getDeletePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getListPrincipalAccessBoundaryPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse>( + service, METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES))) + .addMethod( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse>( + service, METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PrincipalAccessBoundaryPolicies"); + } + } + + private static final class PrincipalAccessBoundaryPoliciesFileDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier { + PrincipalAccessBoundaryPoliciesFileDescriptorSupplier() {} + } + + private static final class PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesFileDescriptorSupplier()) + .addMethod(getCreatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getGetPrincipalAccessBoundaryPolicyMethod()) + .addMethod(getUpdatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getDeletePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getListPrincipalAccessBoundaryPoliciesMethod()) + .addMethod(getSearchPrincipalAccessBoundaryPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-common-iam/owlbot.py b/java-common-iam/owlbot.py new file mode 100644 index 000000000000..6da47954339a --- /dev/null +++ b/java-common-iam/owlbot.py @@ -0,0 +1,38 @@ +# Copyright 2024 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 +# +# https://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. + +import synthtool as s +from synthtool.languages import java + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + monorepo=True, + excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore", + ], +) \ No newline at end of file diff --git a/java-common-iam/pom.xml b/java-common-iam/pom.xml new file mode 100644 index 000000000000..19095a1d1d2a --- /dev/null +++ b/java-common-iam/pom.xml @@ -0,0 +1,103 @@ + + + 4.0.0 + com.google.api.grpc.api.grpc + proto-google-iam-v1-parent + pom + 1.65.0 + Google IAM Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.85.0 + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + proto-google-iam-v1-parent + + + + + + com.google.api.grpc.api.grpc + proto-google-iam-v1 + 1.65.0 + + + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v1 + 1.65.0 + + + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v3beta + 1.65.0 + + + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v3 + 1.65.0 + + + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v2 + 1.65.0 + + + com.google.api.grpc.api.grpc + grpc-proto-google-iam-v1-v2beta + 1.65.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3 + 1.65.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2 + 1.65.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3beta + 1.65.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v1 + 1.65.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2beta + 1.65.0 + + + + + + + proto-google-iam-v1 + grpc-proto-google-iam-v1-v1 + grpc-proto-google-iam-v1-v3beta + grpc-proto-google-iam-v1-v3 + grpc-proto-google-iam-v1-v2 + grpc-proto-google-iam-v1-v2beta + proto-proto-google-iam-v1-v3 + proto-proto-google-iam-v1-v2 + proto-proto-google-iam-v1-v3beta + proto-proto-google-iam-v1-v1 + proto-proto-google-iam-v1-v2beta + proto-google-iam-v1-bom + + + diff --git a/java-common-iam/proto-google-iam-v1/clirr-ignored-differences.xml b/java-common-iam/proto-google-iam-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..70e35c15384c --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/java-common-iam/proto-google-iam-v1/pom.xml b/java-common-iam/proto-google-iam-v1/pom.xml new file mode 100644 index 000000000000..a0c2e07a4f35 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-google-iam-v1 + 1.65.0 + proto-google-iam-v1 + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesClient.java new file mode 100644 index 000000000000..b0a621c066ad --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesClient.java @@ -0,0 +1,973 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v2.stub.PoliciesStub; +import com.google.iam.v2.stub.PoliciesStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: An interface for managing Identity and Access Management (IAM) policies. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+ *   String name = "name3373707";
+ *   Policy response = policiesClient.getPolicy(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PoliciesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListPolicies

Retrieves the policies of the specified kind that are attached to a resource. + *

The response lists only policy metadata. In particular, policy rules are omitted.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPolicies(ListPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPoliciesPagedCallable() + *

  • listPoliciesCallable() + *

+ *

GetPolicy

Gets a policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPolicy(GetPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPolicy(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPolicyCallable() + *

+ *

CreatePolicy

Creates a policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPolicyAsync(CreatePolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPolicyAsync(String parent, Policy policy, String policyId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPolicyOperationCallable() + *

  • createPolicyCallable() + *

+ *

UpdatePolicy

Updates the specified policy. + *

You can update only the rules and the display name for the policy. + *

To update a policy, you should use a read-modify-write loop: + *

1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + *

This pattern helps prevent conflicts between concurrent updates.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePolicyAsync(UpdatePolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePolicyOperationCallable() + *

  • updatePolicyCallable() + *

+ *

DeletePolicy

Deletes a policy. This action is permanent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePolicyAsync(DeletePolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePolicyAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePolicyOperationCallable() + *

  • deletePolicyCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PoliciesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings =
+ *     PoliciesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings =
+ *     PoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings = PoliciesSettings.newHttpJsonBuilder().build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PoliciesClient implements BackgroundResource { + private final PoliciesSettings settings; + private final PoliciesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PoliciesClient with default settings. */ + public static final PoliciesClient create() throws IOException { + return create(PoliciesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PoliciesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PoliciesClient create(PoliciesSettings settings) throws IOException { + return new PoliciesClient(settings); + } + + /** + * Constructs an instance of PoliciesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(PoliciesSettings). + */ + public static final PoliciesClient create(PoliciesStub stub) { + return new PoliciesClient(stub); + } + + /** + * Constructs an instance of PoliciesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected PoliciesClient(PoliciesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PoliciesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PoliciesClient(PoliciesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PoliciesSettings getSettings() { + return settings; + } + + public PoliciesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Policy element : policiesClient.listPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource that the policy is attached to, along with the kind of + * policy to list. Format: `policies/{attachment_point}/denypolicies` + *

The attachment point is identified by its URL-encoded full resource name, which means + * that the forward-slash character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPoliciesPagedResponse listPolicies(String parent) { + ListPoliciesRequest request = ListPoliciesRequest.newBuilder().setParent(parent).build(); + return listPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Policy element : policiesClient.listPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPoliciesPagedResponse listPolicies(ListPoliciesRequest request) { + return listPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = policiesClient.listPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Policy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPoliciesPagedCallable() { + return stub.listPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPoliciesResponse response = policiesClient.listPoliciesCallable().call(request);
+   *     for (Policy element : response.getPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listPoliciesCallable() { + return stub.listPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String name = "name3373707";
+   *   Policy response = policiesClient.getPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + *

Use the URL-encoded full resource name, which means that the forward-slash character, + * `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getPolicy(String name) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName(name).build(); + return getPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build();
+   *   Policy response = policiesClient.getPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getPolicy(GetPolicyRequest request) { + return getPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = policiesClient.getPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPolicyCallable() { + return stub.getPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Policy policy = Policy.newBuilder().build();
+   *   String policyId = "policyId546908653";
+   *   Policy response = policiesClient.createPolicyAsync(parent, policy, policyId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource that the policy is attached to, along with the kind of + * policy to create. Format: `policies/{attachment_point}/denypolicies` + *

The attachment point is identified by its URL-encoded full resource name, which means + * that the forward-slash character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @param policy Required. The policy to create. + * @param policyId The ID to use for this policy, which will become the final component of the + * policy's resource name. The ID must contain 3 to 63 characters. It can contain lowercase + * letters and numbers, as well as dashes (`-`) and periods (`.`). The first character must be + * a lowercase letter. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyAsync( + String parent, Policy policy, String policyId) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent(parent) + .setPolicy(policy) + .setPolicyId(policyId) + .build(); + return createPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   Policy response = policiesClient.createPolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyAsync( + CreatePolicyRequest request) { + return createPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   OperationFuture future =
+   *       policiesClient.createPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPolicyOperationCallable() { + return stub.createPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   ApiFuture future = policiesClient.createPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPolicyCallable() { + return stub.createPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   Policy response = policiesClient.updatePolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyAsync( + UpdatePolicyRequest request) { + return updatePolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   OperationFuture future =
+   *       policiesClient.updatePolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updatePolicyOperationCallable() { + return stub.updatePolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   ApiFuture future = policiesClient.updatePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePolicyCallable() { + return stub.updatePolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String name = "name3373707";
+   *   Policy response = policiesClient.deletePolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + *

Use the URL-encoded full resource name, which means that the forward-slash character, + * `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyAsync(String name) { + DeletePolicyRequest request = DeletePolicyRequest.newBuilder().setName(name).build(); + return deletePolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   Policy response = policiesClient.deletePolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyAsync( + DeletePolicyRequest request) { + return deletePolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   OperationFuture future =
+   *       policiesClient.deletePolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePolicyOperationCallable() { + return stub.deletePolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   ApiFuture future = policiesClient.deletePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePolicyCallable() { + return stub.deletePolicyCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPoliciesPagedResponse + extends AbstractPagedListResponse< + ListPoliciesRequest, + ListPoliciesResponse, + Policy, + ListPoliciesPage, + ListPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPoliciesPagedResponse(ListPoliciesPage page) { + super(page, ListPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPoliciesPage + extends AbstractPage { + + private ListPoliciesPage( + PageContext context, + ListPoliciesResponse response) { + super(context, response); + } + + private static ListPoliciesPage createEmptyPage() { + return new ListPoliciesPage(null, null); + } + + @Override + protected ListPoliciesPage createPage( + PageContext context, + ListPoliciesResponse response) { + return new ListPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPoliciesRequest, + ListPoliciesResponse, + Policy, + ListPoliciesPage, + ListPoliciesFixedSizeCollection> { + + private ListPoliciesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPoliciesFixedSizeCollection createEmptyCollection() { + return new ListPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPoliciesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesSettings.java new file mode 100644 index 000000000000..3370fde3c445 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/PoliciesSettings.java @@ -0,0 +1,322 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v2.stub.PoliciesStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PoliciesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder();
+ * policiesSettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         policiesSettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PoliciesSettings policiesSettings = policiesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policiesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PoliciesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listPolicies. */ + public PagedCallSettings + listPoliciesSettings() { + return ((PoliciesStubSettings) getStubSettings()).listPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).getPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public UnaryCallSettings createPolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).createPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public OperationCallSettings + createPolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).createPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).updatePolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public OperationCallSettings + updatePolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).updatePolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public UnaryCallSettings deletePolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).deletePolicySettings(); + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public OperationCallSettings + deletePolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).deletePolicyOperationSettings(); + } + + public static final PoliciesSettings create(PoliciesStubSettings stub) throws IOException { + return new PoliciesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PoliciesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PoliciesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PoliciesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PoliciesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PoliciesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PoliciesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PoliciesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PoliciesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PoliciesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PoliciesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PoliciesStubSettings.newBuilder(clientContext)); + } + + protected Builder(PoliciesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PoliciesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PoliciesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PoliciesStubSettings.newHttpJsonBuilder()); + } + + public PoliciesStubSettings.Builder getStubSettingsBuilder() { + return ((PoliciesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listPolicies. */ + public PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings() { + return getStubSettingsBuilder().listPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder getPolicySettings() { + return getStubSettingsBuilder().getPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public UnaryCallSettings.Builder createPolicySettings() { + return getStubSettingsBuilder().createPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public OperationCallSettings.Builder + createPolicyOperationSettings() { + return getStubSettingsBuilder().createPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder updatePolicySettings() { + return getStubSettingsBuilder().updatePolicySettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public OperationCallSettings.Builder + updatePolicyOperationSettings() { + return getStubSettingsBuilder().updatePolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public UnaryCallSettings.Builder deletePolicySettings() { + return getStubSettingsBuilder().deletePolicySettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public OperationCallSettings.Builder + deletePolicyOperationSettings() { + return getStubSettingsBuilder().deletePolicyOperationSettings(); + } + + @Override + public PoliciesSettings build() throws IOException { + return new PoliciesSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/gapic_metadata.json b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/gapic_metadata.json new file mode 100644 index 000000000000..4277cbfcc4ab --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.iam.v2", + "libraryPackage": "com.google.iam.v2", + "services": { + "Policies": { + "clients": { + "grpc": { + "libraryClient": "PoliciesClient", + "rpcs": { + "CreatePolicy": { + "methods": ["createPolicyAsync", "createPolicyAsync", "createPolicyOperationCallable", "createPolicyCallable"] + }, + "DeletePolicy": { + "methods": ["deletePolicyAsync", "deletePolicyAsync", "deletePolicyOperationCallable", "deletePolicyCallable"] + }, + "GetPolicy": { + "methods": ["getPolicy", "getPolicy", "getPolicyCallable"] + }, + "ListPolicies": { + "methods": ["listPolicies", "listPolicies", "listPoliciesPagedCallable", "listPoliciesCallable"] + }, + "UpdatePolicy": { + "methods": ["updatePolicyAsync", "updatePolicyOperationCallable", "updatePolicyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/package-info.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/package-info.java new file mode 100644 index 000000000000..ef10eec4ea9a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +/** + * A client to Identity and Access Management (IAM) API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= PoliciesClient ======================= + * + *

Service Description: An interface for managing Identity and Access Management (IAM) policies. + * + *

Sample for PoliciesClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+ *   String name = "name3373707";
+ *   Policy response = policiesClient.getPolicy(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.iam.v2; + +import javax.annotation.Generated; diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesCallableFactory.java new file mode 100644 index 000000000000..0e26dc4b9c6a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Policies service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPoliciesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java new file mode 100644 index 000000000000..076e54c7ebce --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java @@ -0,0 +1,335 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.ListPoliciesResponse; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; +import com.google.iam.v2.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPoliciesStub extends PoliciesStub { + private static final MethodDescriptor + listPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2.Policies/ListPolicies") + .setRequestMarshaller(ProtoUtils.marshaller(ListPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2.Policies/GetPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2.Policies/CreatePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(CreatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2.Policies/UpdatePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2.Policies/DeletePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(DeletePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable listPoliciesCallable; + private final UnaryCallable + listPoliciesPagedCallable; + private final UnaryCallable getPolicyCallable; + private final UnaryCallable createPolicyCallable; + private final OperationCallable + createPolicyOperationCallable; + private final UnaryCallable updatePolicyCallable; + private final OperationCallable + updatePolicyOperationCallable; + private final UnaryCallable deletePolicyCallable; + private final OperationCallable + deletePolicyOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPoliciesStub create(PoliciesStubSettings settings) throws IOException { + return new GrpcPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPoliciesStub create(ClientContext clientContext) throws IOException { + return new GrpcPoliciesStub(PoliciesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPoliciesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPoliciesStub( + PoliciesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPoliciesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPoliciesStub(PoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPoliciesCallableFactory()); + } + + /** + * Constructs an instance of GrpcPoliciesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPoliciesStub( + PoliciesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updatePolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("policy.name", String.valueOf(request.getPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listPoliciesCallable = + callableFactory.createUnaryCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.listPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.createPolicyCallable = + callableFactory.createUnaryCallable( + createPolicyTransportSettings, settings.createPolicySettings(), clientContext); + this.createPolicyOperationCallable = + callableFactory.createOperationCallable( + createPolicyTransportSettings, + settings.createPolicyOperationSettings(), + clientContext, + operationsStub); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.updatePolicyOperationCallable = + callableFactory.createOperationCallable( + updatePolicyTransportSettings, + settings.updatePolicyOperationSettings(), + clientContext, + operationsStub); + this.deletePolicyCallable = + callableFactory.createUnaryCallable( + deletePolicyTransportSettings, settings.deletePolicySettings(), clientContext); + this.deletePolicyOperationCallable = + callableFactory.createOperationCallable( + deletePolicyTransportSettings, + settings.deletePolicyOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listPoliciesCallable() { + return listPoliciesCallable; + } + + @Override + public UnaryCallable listPoliciesPagedCallable() { + return listPoliciesPagedCallable; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable createPolicyCallable() { + return createPolicyCallable; + } + + @Override + public OperationCallable + createPolicyOperationCallable() { + return createPolicyOperationCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public OperationCallable + updatePolicyOperationCallable() { + return updatePolicyOperationCallable; + } + + @Override + public UnaryCallable deletePolicyCallable() { + return deletePolicyCallable; + } + + @Override + public OperationCallable + deletePolicyOperationCallable() { + return deletePolicyOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesCallableFactory.java new file mode 100644 index 000000000000..bfbc07907bc3 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Policies service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPoliciesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java new file mode 100644 index 000000000000..fdd64661ab6b --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java @@ -0,0 +1,520 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.ListPoliciesResponse; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; +import com.google.iam.v2.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPoliciesStub extends PoliciesStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(PolicyOperationMetadata.getDescriptor()) + .add(Policy.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listPoliciesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2.Policies/ListPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=policies/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2.Policies/GetPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2.Policies/CreatePolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=policies/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "policyId", request.getPolicyId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updatePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2.Policies/UpdatePolicy") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{policy.name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policy.name", request.getPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2.Policies/DeletePolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable listPoliciesCallable; + private final UnaryCallable + listPoliciesPagedCallable; + private final UnaryCallable getPolicyCallable; + private final UnaryCallable createPolicyCallable; + private final OperationCallable + createPolicyOperationCallable; + private final UnaryCallable updatePolicyCallable; + private final OperationCallable + updatePolicyOperationCallable; + private final UnaryCallable deletePolicyCallable; + private final OperationCallable + deletePolicyOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPoliciesStub create(PoliciesStubSettings settings) + throws IOException { + return new HttpJsonPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPoliciesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonPoliciesStub( + PoliciesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPoliciesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPoliciesStub( + PoliciesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPoliciesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPoliciesStub(PoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPoliciesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPoliciesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPoliciesStub( + PoliciesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder().setGet("/v2/{name=policies/*/*/*/operations/*}").build()) + .build()); + + HttpJsonCallSettings listPoliciesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updatePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("policy.name", String.valueOf(request.getPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deletePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listPoliciesCallable = + callableFactory.createUnaryCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.listPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.createPolicyCallable = + callableFactory.createUnaryCallable( + createPolicyTransportSettings, settings.createPolicySettings(), clientContext); + this.createPolicyOperationCallable = + callableFactory.createOperationCallable( + createPolicyTransportSettings, + settings.createPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.updatePolicyOperationCallable = + callableFactory.createOperationCallable( + updatePolicyTransportSettings, + settings.updatePolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePolicyCallable = + callableFactory.createUnaryCallable( + deletePolicyTransportSettings, settings.deletePolicySettings(), clientContext); + this.deletePolicyOperationCallable = + callableFactory.createOperationCallable( + deletePolicyTransportSettings, + settings.deletePolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listPoliciesMethodDescriptor); + methodDescriptors.add(getPolicyMethodDescriptor); + methodDescriptors.add(createPolicyMethodDescriptor); + methodDescriptors.add(updatePolicyMethodDescriptor); + methodDescriptors.add(deletePolicyMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listPoliciesCallable() { + return listPoliciesCallable; + } + + @Override + public UnaryCallable listPoliciesPagedCallable() { + return listPoliciesPagedCallable; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable createPolicyCallable() { + return createPolicyCallable; + } + + @Override + public OperationCallable + createPolicyOperationCallable() { + return createPolicyOperationCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public OperationCallable + updatePolicyOperationCallable() { + return updatePolicyOperationCallable; + } + + @Override + public UnaryCallable deletePolicyCallable() { + return deletePolicyCallable; + } + + @Override + public OperationCallable + deletePolicyOperationCallable() { + return deletePolicyOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStub.java new file mode 100644 index 000000000000..213a718b3427 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStub.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.ListPoliciesResponse; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; +import com.google.iam.v2.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PoliciesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPoliciesPagedCallable()"); + } + + public UnaryCallable listPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: listPoliciesCallable()"); + } + + public UnaryCallable getPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyCallable()"); + } + + public OperationCallable + createPolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyOperationCallable()"); + } + + public UnaryCallable createPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyCallable()"); + } + + public OperationCallable + updatePolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyOperationCallable()"); + } + + public UnaryCallable updatePolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()"); + } + + public OperationCallable + deletePolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyOperationCallable()"); + } + + public UnaryCallable deletePolicyCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java new file mode 100644 index 000000000000..f856b75fcd08 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java @@ -0,0 +1,675 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.ListPoliciesResponse; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; +import com.google.iam.v2.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PoliciesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder();
+ * policiesSettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         policiesSettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PoliciesStubSettings policiesSettings = policiesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policiesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PoliciesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings; + private final UnaryCallSettings getPolicySettings; + private final UnaryCallSettings createPolicySettings; + private final OperationCallSettings + createPolicyOperationSettings; + private final UnaryCallSettings updatePolicySettings; + private final OperationCallSettings + updatePolicyOperationSettings; + private final UnaryCallSettings deletePolicySettings; + private final OperationCallSettings + deletePolicyOperationSettings; + + private static final PagedListDescriptor + LIST_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPoliciesRequest injectToken(ListPoliciesRequest payload, String token) { + return ListPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPoliciesRequest injectPageSize(ListPoliciesRequest payload, int pageSize) { + return ListPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPoliciesResponse payload) { + return payload.getPoliciesList(); + } + }; + + private static final PagedListResponseFactory< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + LIST_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_POLICIES_PAGE_STR_DESC, request, context); + return ListPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listPolicies. */ + public PagedCallSettings + listPoliciesSettings() { + return listPoliciesSettings; + } + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return getPolicySettings; + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public UnaryCallSettings createPolicySettings() { + return createPolicySettings; + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public OperationCallSettings + createPolicyOperationSettings() { + return createPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public OperationCallSettings + updatePolicyOperationSettings() { + return updatePolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public UnaryCallSettings deletePolicySettings() { + return deletePolicySettings; + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public OperationCallSettings + deletePolicyOperationSettings() { + return deletePolicyOperationSettings; + } + + public PoliciesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPoliciesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPoliciesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PoliciesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PoliciesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PoliciesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PoliciesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listPoliciesSettings = settingsBuilder.listPoliciesSettings().build(); + getPolicySettings = settingsBuilder.getPolicySettings().build(); + createPolicySettings = settingsBuilder.createPolicySettings().build(); + createPolicyOperationSettings = settingsBuilder.createPolicyOperationSettings().build(); + updatePolicySettings = settingsBuilder.updatePolicySettings().build(); + updatePolicyOperationSettings = settingsBuilder.updatePolicyOperationSettings().build(); + deletePolicySettings = settingsBuilder.deletePolicySettings().build(); + deletePolicyOperationSettings = settingsBuilder.deletePolicyOperationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PoliciesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings; + private final UnaryCallSettings.Builder getPolicySettings; + private final UnaryCallSettings.Builder createPolicySettings; + private final OperationCallSettings.Builder< + CreatePolicyRequest, Policy, PolicyOperationMetadata> + createPolicyOperationSettings; + private final UnaryCallSettings.Builder updatePolicySettings; + private final OperationCallSettings.Builder< + UpdatePolicyRequest, Policy, PolicyOperationMetadata> + updatePolicyOperationSettings; + private final UnaryCallSettings.Builder deletePolicySettings; + private final OperationCallSettings.Builder< + DeletePolicyRequest, Policy, PolicyOperationMetadata> + deletePolicyOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listPoliciesSettings = PagedCallSettings.newBuilder(LIST_POLICIES_PAGE_STR_FACT); + getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyOperationSettings = OperationCallSettings.newBuilder(); + updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyOperationSettings = OperationCallSettings.newBuilder(); + deletePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPoliciesSettings, + getPolicySettings, + createPolicySettings, + updatePolicySettings, + deletePolicySettings); + initDefaults(this); + } + + protected Builder(PoliciesStubSettings settings) { + super(settings); + + listPoliciesSettings = settings.listPoliciesSettings.toBuilder(); + getPolicySettings = settings.getPolicySettings.toBuilder(); + createPolicySettings = settings.createPolicySettings.toBuilder(); + createPolicyOperationSettings = settings.createPolicyOperationSettings.toBuilder(); + updatePolicySettings = settings.updatePolicySettings.toBuilder(); + updatePolicyOperationSettings = settings.updatePolicyOperationSettings.toBuilder(); + deletePolicySettings = settings.deletePolicySettings.toBuilder(); + deletePolicyOperationSettings = settings.deletePolicyOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPoliciesSettings, + getPolicySettings, + createPolicySettings, + updatePolicySettings, + deletePolicySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listPolicies. */ + public PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings() { + return listPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder getPolicySettings() { + return getPolicySettings; + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public UnaryCallSettings.Builder createPolicySettings() { + return createPolicySettings; + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public OperationCallSettings.Builder + createPolicyOperationSettings() { + return createPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public OperationCallSettings.Builder + updatePolicyOperationSettings() { + return updatePolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public UnaryCallSettings.Builder deletePolicySettings() { + return deletePolicySettings; + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public OperationCallSettings.Builder + deletePolicyOperationSettings() { + return deletePolicyOperationSettings; + } + + @Override + public PoliciesStubSettings build() throws IOException { + return new PoliciesStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesClient.java new file mode 100644 index 000000000000..2d5f5ea986e2 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesClient.java @@ -0,0 +1,974 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v2beta.stub.PoliciesStub; +import com.google.iam.v2beta.stub.PoliciesStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: An interface for managing Identity and Access Management (IAM) policies. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+ *   String name = "name3373707";
+ *   Policy response = policiesClient.getPolicy(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PoliciesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListPolicies

Retrieves the policies of the specified kind that are attached to a resource. + *

The response lists only policy metadata. In particular, policy rules are omitted.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPolicies(ListPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPoliciesPagedCallable() + *

  • listPoliciesCallable() + *

+ *

GetPolicy

Gets a policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPolicy(GetPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPolicy(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPolicyCallable() + *

+ *

CreatePolicy

Creates a policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPolicyAsync(CreatePolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPolicyAsync(String parent, Policy policy, String policyId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPolicyOperationCallable() + *

  • createPolicyCallable() + *

+ *

UpdatePolicy

Updates the specified policy. + *

You can update only the rules and the display name for the policy. + *

To update a policy, you should use a read-modify-write loop: + *

1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + *

This pattern helps prevent conflicts between concurrent updates.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePolicyAsync(UpdatePolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePolicyOperationCallable() + *

  • updatePolicyCallable() + *

+ *

DeletePolicy

Deletes a policy. This action is permanent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePolicyAsync(DeletePolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePolicyAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePolicyOperationCallable() + *

  • deletePolicyCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PoliciesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings =
+ *     PoliciesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings =
+ *     PoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings policiesSettings = PoliciesSettings.newHttpJsonBuilder().build();
+ * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class PoliciesClient implements BackgroundResource { + private final PoliciesSettings settings; + private final PoliciesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PoliciesClient with default settings. */ + public static final PoliciesClient create() throws IOException { + return create(PoliciesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PoliciesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PoliciesClient create(PoliciesSettings settings) throws IOException { + return new PoliciesClient(settings); + } + + /** + * Constructs an instance of PoliciesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(PoliciesSettings). + */ + public static final PoliciesClient create(PoliciesStub stub) { + return new PoliciesClient(stub); + } + + /** + * Constructs an instance of PoliciesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected PoliciesClient(PoliciesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PoliciesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PoliciesClient(PoliciesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PoliciesSettings getSettings() { + return settings; + } + + public PoliciesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Policy element : policiesClient.listPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource that the policy is attached to, along with the kind of + * policy to list. Format: `policies/{attachment_point}/denypolicies` + *

The attachment point is identified by its URL-encoded full resource name, which means + * that the forward-slash character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPoliciesPagedResponse listPolicies(String parent) { + ListPoliciesRequest request = ListPoliciesRequest.newBuilder().setParent(parent).build(); + return listPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Policy element : policiesClient.listPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPoliciesPagedResponse listPolicies(ListPoliciesRequest request) { + return listPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = policiesClient.listPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Policy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPoliciesPagedCallable() { + return stub.listPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the policies of the specified kind that are attached to a resource. + * + *

The response lists only policy metadata. In particular, policy rules are omitted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   ListPoliciesRequest request =
+   *       ListPoliciesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPoliciesResponse response = policiesClient.listPoliciesCallable().call(request);
+   *     for (Policy element : response.getPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listPoliciesCallable() { + return stub.listPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String name = "name3373707";
+   *   Policy response = policiesClient.getPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + *

Use the URL-encoded full resource name, which means that the forward-slash character, + * `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getPolicy(String name) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName(name).build(); + return getPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build();
+   *   Policy response = policiesClient.getPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getPolicy(GetPolicyRequest request) { + return getPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = policiesClient.getPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPolicyCallable() { + return stub.getPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Policy policy = Policy.newBuilder().build();
+   *   String policyId = "policyId546908653";
+   *   Policy response = policiesClient.createPolicyAsync(parent, policy, policyId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource that the policy is attached to, along with the kind of + * policy to create. Format: `policies/{attachment_point}/denypolicies` + *

The attachment point is identified by its URL-encoded full resource name, which means + * that the forward-slash character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @param policy Required. The policy to create. + * @param policyId The ID to use for this policy, which will become the final component of the + * policy's resource name. The ID must contain 3 to 63 characters. It can contain lowercase + * letters and numbers, as well as dashes (`-`) and periods (`.`). The first character must be + * a lowercase letter. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyAsync( + String parent, Policy policy, String policyId) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent(parent) + .setPolicy(policy) + .setPolicyId(policyId) + .build(); + return createPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   Policy response = policiesClient.createPolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyAsync( + CreatePolicyRequest request) { + return createPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   OperationFuture future =
+   *       policiesClient.createPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPolicyOperationCallable() { + return stub.createPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   CreatePolicyRequest request =
+   *       CreatePolicyRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setPolicyId("policyId546908653")
+   *           .build();
+   *   ApiFuture future = policiesClient.createPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPolicyCallable() { + return stub.createPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   Policy response = policiesClient.updatePolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyAsync( + UpdatePolicyRequest request) { + return updatePolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   OperationFuture future =
+   *       policiesClient.updatePolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updatePolicyOperationCallable() { + return stub.updatePolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified policy. + * + *

You can update only the rules and the display name for the policy. + * + *

To update a policy, you should use a read-modify-write loop: + * + *

1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the + * policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. + * + *

This pattern helps prevent conflicts between concurrent updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   UpdatePolicyRequest request =
+   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
+   *   ApiFuture future = policiesClient.updatePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePolicyCallable() { + return stub.updatePolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   String name = "name3373707";
+   *   Policy response = policiesClient.deletePolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + *

Use the URL-encoded full resource name, which means that the forward-slash character, + * `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + *

For organizations and folders, use the numeric ID in the full resource name. For + * projects, you can use the alphanumeric or the numeric ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyAsync(String name) { + DeletePolicyRequest request = DeletePolicyRequest.newBuilder().setName(name).build(); + return deletePolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   Policy response = policiesClient.deletePolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyAsync( + DeletePolicyRequest request) { + return deletePolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   OperationFuture future =
+   *       policiesClient.deletePolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePolicyOperationCallable() { + return stub.deletePolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy. This action is permanent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+   *   DeletePolicyRequest request =
+   *       DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build();
+   *   ApiFuture future = policiesClient.deletePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePolicyCallable() { + return stub.deletePolicyCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPoliciesPagedResponse + extends AbstractPagedListResponse< + ListPoliciesRequest, + ListPoliciesResponse, + Policy, + ListPoliciesPage, + ListPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPoliciesPagedResponse(ListPoliciesPage page) { + super(page, ListPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPoliciesPage + extends AbstractPage { + + private ListPoliciesPage( + PageContext context, + ListPoliciesResponse response) { + super(context, response); + } + + private static ListPoliciesPage createEmptyPage() { + return new ListPoliciesPage(null, null); + } + + @Override + protected ListPoliciesPage createPage( + PageContext context, + ListPoliciesResponse response) { + return new ListPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPoliciesRequest, + ListPoliciesResponse, + Policy, + ListPoliciesPage, + ListPoliciesFixedSizeCollection> { + + private ListPoliciesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPoliciesFixedSizeCollection createEmptyCollection() { + return new ListPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPoliciesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesSettings.java new file mode 100644 index 000000000000..7ea2d4a3f288 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/PoliciesSettings.java @@ -0,0 +1,323 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v2beta.stub.PoliciesStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PoliciesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder();
+ * policiesSettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         policiesSettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PoliciesSettings policiesSettings = policiesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policiesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PoliciesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listPolicies. */ + public PagedCallSettings + listPoliciesSettings() { + return ((PoliciesStubSettings) getStubSettings()).listPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).getPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public UnaryCallSettings createPolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).createPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public OperationCallSettings + createPolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).createPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).updatePolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public OperationCallSettings + updatePolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).updatePolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public UnaryCallSettings deletePolicySettings() { + return ((PoliciesStubSettings) getStubSettings()).deletePolicySettings(); + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public OperationCallSettings + deletePolicyOperationSettings() { + return ((PoliciesStubSettings) getStubSettings()).deletePolicyOperationSettings(); + } + + public static final PoliciesSettings create(PoliciesStubSettings stub) throws IOException { + return new PoliciesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PoliciesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PoliciesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PoliciesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PoliciesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PoliciesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PoliciesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PoliciesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PoliciesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PoliciesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PoliciesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PoliciesStubSettings.newBuilder(clientContext)); + } + + protected Builder(PoliciesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PoliciesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PoliciesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PoliciesStubSettings.newHttpJsonBuilder()); + } + + public PoliciesStubSettings.Builder getStubSettingsBuilder() { + return ((PoliciesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listPolicies. */ + public PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings() { + return getStubSettingsBuilder().listPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder getPolicySettings() { + return getStubSettingsBuilder().getPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public UnaryCallSettings.Builder createPolicySettings() { + return getStubSettingsBuilder().createPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public OperationCallSettings.Builder + createPolicyOperationSettings() { + return getStubSettingsBuilder().createPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder updatePolicySettings() { + return getStubSettingsBuilder().updatePolicySettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public OperationCallSettings.Builder + updatePolicyOperationSettings() { + return getStubSettingsBuilder().updatePolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public UnaryCallSettings.Builder deletePolicySettings() { + return getStubSettingsBuilder().deletePolicySettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public OperationCallSettings.Builder + deletePolicyOperationSettings() { + return getStubSettingsBuilder().deletePolicyOperationSettings(); + } + + @Override + public PoliciesSettings build() throws IOException { + return new PoliciesSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/gapic_metadata.json b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/gapic_metadata.json new file mode 100644 index 000000000000..54136f109a7b --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.iam.v2beta", + "libraryPackage": "com.google.iam.v2beta", + "services": { + "Policies": { + "clients": { + "grpc": { + "libraryClient": "PoliciesClient", + "rpcs": { + "CreatePolicy": { + "methods": ["createPolicyAsync", "createPolicyAsync", "createPolicyOperationCallable", "createPolicyCallable"] + }, + "DeletePolicy": { + "methods": ["deletePolicyAsync", "deletePolicyAsync", "deletePolicyOperationCallable", "deletePolicyCallable"] + }, + "GetPolicy": { + "methods": ["getPolicy", "getPolicy", "getPolicyCallable"] + }, + "ListPolicies": { + "methods": ["listPolicies", "listPolicies", "listPoliciesPagedCallable", "listPoliciesCallable"] + }, + "UpdatePolicy": { + "methods": ["updatePolicyAsync", "updatePolicyOperationCallable", "updatePolicyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/package-info.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/package-info.java new file mode 100644 index 000000000000..a2d1a228579c --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +/** + * A client to Identity and Access Management (IAM) API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= PoliciesClient ======================= + * + *

Service Description: An interface for managing Identity and Access Management (IAM) policies. + * + *

Sample for PoliciesClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PoliciesClient policiesClient = PoliciesClient.create()) {
+ *   String name = "name3373707";
+ *   Policy response = policiesClient.getPolicy(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.iam.v2beta; + +import javax.annotation.Generated; diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesCallableFactory.java new file mode 100644 index 000000000000..1ebd5683e9bd --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Policies service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPoliciesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesStub.java new file mode 100644 index 000000000000..4aa1906e1ef6 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/GrpcPoliciesStub.java @@ -0,0 +1,337 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.ListPoliciesResponse; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; +import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPoliciesStub extends PoliciesStub { + private static final MethodDescriptor + listPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2beta.Policies/ListPolicies") + .setRequestMarshaller(ProtoUtils.marshaller(ListPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2beta.Policies/GetPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2beta.Policies/CreatePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(CreatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2beta.Policies/UpdatePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v2beta.Policies/DeletePolicy") + .setRequestMarshaller(ProtoUtils.marshaller(DeletePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable listPoliciesCallable; + private final UnaryCallable + listPoliciesPagedCallable; + private final UnaryCallable getPolicyCallable; + private final UnaryCallable createPolicyCallable; + private final OperationCallable + createPolicyOperationCallable; + private final UnaryCallable updatePolicyCallable; + private final OperationCallable + updatePolicyOperationCallable; + private final UnaryCallable deletePolicyCallable; + private final OperationCallable + deletePolicyOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPoliciesStub create(PoliciesStubSettings settings) throws IOException { + return new GrpcPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPoliciesStub create(ClientContext clientContext) throws IOException { + return new GrpcPoliciesStub(PoliciesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPoliciesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPoliciesStub( + PoliciesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPoliciesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPoliciesStub(PoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPoliciesCallableFactory()); + } + + /** + * Constructs an instance of GrpcPoliciesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPoliciesStub( + PoliciesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updatePolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("policy.name", String.valueOf(request.getPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listPoliciesCallable = + callableFactory.createUnaryCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.listPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.createPolicyCallable = + callableFactory.createUnaryCallable( + createPolicyTransportSettings, settings.createPolicySettings(), clientContext); + this.createPolicyOperationCallable = + callableFactory.createOperationCallable( + createPolicyTransportSettings, + settings.createPolicyOperationSettings(), + clientContext, + operationsStub); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.updatePolicyOperationCallable = + callableFactory.createOperationCallable( + updatePolicyTransportSettings, + settings.updatePolicyOperationSettings(), + clientContext, + operationsStub); + this.deletePolicyCallable = + callableFactory.createUnaryCallable( + deletePolicyTransportSettings, settings.deletePolicySettings(), clientContext); + this.deletePolicyOperationCallable = + callableFactory.createOperationCallable( + deletePolicyTransportSettings, + settings.deletePolicyOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listPoliciesCallable() { + return listPoliciesCallable; + } + + @Override + public UnaryCallable listPoliciesPagedCallable() { + return listPoliciesPagedCallable; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable createPolicyCallable() { + return createPolicyCallable; + } + + @Override + public OperationCallable + createPolicyOperationCallable() { + return createPolicyOperationCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public OperationCallable + updatePolicyOperationCallable() { + return updatePolicyOperationCallable; + } + + @Override + public UnaryCallable deletePolicyCallable() { + return deletePolicyCallable; + } + + @Override + public OperationCallable + deletePolicyOperationCallable() { + return deletePolicyOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesCallableFactory.java new file mode 100644 index 000000000000..291c6f1cd462 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Policies service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPoliciesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java new file mode 100644 index 000000000000..2f9c4b32fc08 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java @@ -0,0 +1,524 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.ListPoliciesResponse; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; +import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPoliciesStub extends PoliciesStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Policy.getDescriptor()) + .add(PolicyOperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listPoliciesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2beta.Policies/ListPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{parent=policies/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2beta.Policies/GetPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2beta.Policies/CreatePolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{parent=policies/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "policyId", request.getPolicyId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updatePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2beta.Policies/UpdatePolicy") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{policy.name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policy.name", request.getPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v2beta.Policies/DeletePolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=policies/*/*/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable listPoliciesCallable; + private final UnaryCallable + listPoliciesPagedCallable; + private final UnaryCallable getPolicyCallable; + private final UnaryCallable createPolicyCallable; + private final OperationCallable + createPolicyOperationCallable; + private final UnaryCallable updatePolicyCallable; + private final OperationCallable + updatePolicyOperationCallable; + private final UnaryCallable deletePolicyCallable; + private final OperationCallable + deletePolicyOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPoliciesStub create(PoliciesStubSettings settings) + throws IOException { + return new HttpJsonPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPoliciesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonPoliciesStub( + PoliciesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPoliciesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPoliciesStub( + PoliciesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPoliciesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPoliciesStub(PoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPoliciesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPoliciesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPoliciesStub( + PoliciesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v2beta/{name=policies/*/*/*/operations/*}") + .build()) + .build()); + + HttpJsonCallSettings listPoliciesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updatePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("policy.name", String.valueOf(request.getPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deletePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listPoliciesCallable = + callableFactory.createUnaryCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.listPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPoliciesTransportSettings, settings.listPoliciesSettings(), clientContext); + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.createPolicyCallable = + callableFactory.createUnaryCallable( + createPolicyTransportSettings, settings.createPolicySettings(), clientContext); + this.createPolicyOperationCallable = + callableFactory.createOperationCallable( + createPolicyTransportSettings, + settings.createPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.updatePolicyOperationCallable = + callableFactory.createOperationCallable( + updatePolicyTransportSettings, + settings.updatePolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePolicyCallable = + callableFactory.createUnaryCallable( + deletePolicyTransportSettings, settings.deletePolicySettings(), clientContext); + this.deletePolicyOperationCallable = + callableFactory.createOperationCallable( + deletePolicyTransportSettings, + settings.deletePolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listPoliciesMethodDescriptor); + methodDescriptors.add(getPolicyMethodDescriptor); + methodDescriptors.add(createPolicyMethodDescriptor); + methodDescriptors.add(updatePolicyMethodDescriptor); + methodDescriptors.add(deletePolicyMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listPoliciesCallable() { + return listPoliciesCallable; + } + + @Override + public UnaryCallable listPoliciesPagedCallable() { + return listPoliciesPagedCallable; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable createPolicyCallable() { + return createPolicyCallable; + } + + @Override + public OperationCallable + createPolicyOperationCallable() { + return createPolicyOperationCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public OperationCallable + updatePolicyOperationCallable() { + return updatePolicyOperationCallable; + } + + @Override + public UnaryCallable deletePolicyCallable() { + return deletePolicyCallable; + } + + @Override + public OperationCallable + deletePolicyOperationCallable() { + return deletePolicyOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStub.java new file mode 100644 index 000000000000..33cb024ed778 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStub.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.ListPoliciesResponse; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; +import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Policies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class PoliciesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPoliciesPagedCallable()"); + } + + public UnaryCallable listPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: listPoliciesCallable()"); + } + + public UnaryCallable getPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyCallable()"); + } + + public OperationCallable + createPolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyOperationCallable()"); + } + + public UnaryCallable createPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyCallable()"); + } + + public OperationCallable + updatePolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyOperationCallable()"); + } + + public UnaryCallable updatePolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()"); + } + + public OperationCallable + deletePolicyOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyOperationCallable()"); + } + + public UnaryCallable deletePolicyCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java new file mode 100644 index 000000000000..4aafb456680d --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java @@ -0,0 +1,676 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.ListPoliciesResponse; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; +import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PoliciesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder();
+ * policiesSettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         policiesSettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PoliciesStubSettings policiesSettings = policiesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policiesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PoliciesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings; + private final UnaryCallSettings getPolicySettings; + private final UnaryCallSettings createPolicySettings; + private final OperationCallSettings + createPolicyOperationSettings; + private final UnaryCallSettings updatePolicySettings; + private final OperationCallSettings + updatePolicyOperationSettings; + private final UnaryCallSettings deletePolicySettings; + private final OperationCallSettings + deletePolicyOperationSettings; + + private static final PagedListDescriptor + LIST_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPoliciesRequest injectToken(ListPoliciesRequest payload, String token) { + return ListPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPoliciesRequest injectPageSize(ListPoliciesRequest payload, int pageSize) { + return ListPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPoliciesResponse payload) { + return payload.getPoliciesList(); + } + }; + + private static final PagedListResponseFactory< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + LIST_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_POLICIES_PAGE_STR_DESC, request, context); + return ListPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listPolicies. */ + public PagedCallSettings + listPoliciesSettings() { + return listPoliciesSettings; + } + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return getPolicySettings; + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public UnaryCallSettings createPolicySettings() { + return createPolicySettings; + } + + /** Returns the object with the settings used for calls to createPolicy. */ + public OperationCallSettings + createPolicyOperationSettings() { + return createPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public OperationCallSettings + updatePolicyOperationSettings() { + return updatePolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public UnaryCallSettings deletePolicySettings() { + return deletePolicySettings; + } + + /** Returns the object with the settings used for calls to deletePolicy. */ + public OperationCallSettings + deletePolicyOperationSettings() { + return deletePolicyOperationSettings; + } + + public PoliciesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPoliciesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPoliciesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PoliciesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PoliciesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PoliciesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PoliciesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listPoliciesSettings = settingsBuilder.listPoliciesSettings().build(); + getPolicySettings = settingsBuilder.getPolicySettings().build(); + createPolicySettings = settingsBuilder.createPolicySettings().build(); + createPolicyOperationSettings = settingsBuilder.createPolicyOperationSettings().build(); + updatePolicySettings = settingsBuilder.updatePolicySettings().build(); + updatePolicyOperationSettings = settingsBuilder.updatePolicyOperationSettings().build(); + deletePolicySettings = settingsBuilder.deletePolicySettings().build(); + deletePolicyOperationSettings = settingsBuilder.deletePolicyOperationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PoliciesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings; + private final UnaryCallSettings.Builder getPolicySettings; + private final UnaryCallSettings.Builder createPolicySettings; + private final OperationCallSettings.Builder< + CreatePolicyRequest, Policy, PolicyOperationMetadata> + createPolicyOperationSettings; + private final UnaryCallSettings.Builder updatePolicySettings; + private final OperationCallSettings.Builder< + UpdatePolicyRequest, Policy, PolicyOperationMetadata> + updatePolicyOperationSettings; + private final UnaryCallSettings.Builder deletePolicySettings; + private final OperationCallSettings.Builder< + DeletePolicyRequest, Policy, PolicyOperationMetadata> + deletePolicyOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listPoliciesSettings = PagedCallSettings.newBuilder(LIST_POLICIES_PAGE_STR_FACT); + getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyOperationSettings = OperationCallSettings.newBuilder(); + updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyOperationSettings = OperationCallSettings.newBuilder(); + deletePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPoliciesSettings, + getPolicySettings, + createPolicySettings, + updatePolicySettings, + deletePolicySettings); + initDefaults(this); + } + + protected Builder(PoliciesStubSettings settings) { + super(settings); + + listPoliciesSettings = settings.listPoliciesSettings.toBuilder(); + getPolicySettings = settings.getPolicySettings.toBuilder(); + createPolicySettings = settings.createPolicySettings.toBuilder(); + createPolicyOperationSettings = settings.createPolicyOperationSettings.toBuilder(); + updatePolicySettings = settings.updatePolicySettings.toBuilder(); + updatePolicyOperationSettings = settings.updatePolicyOperationSettings.toBuilder(); + deletePolicySettings = settings.deletePolicySettings.toBuilder(); + deletePolicyOperationSettings = settings.deletePolicyOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPoliciesSettings, + getPolicySettings, + createPolicySettings, + updatePolicySettings, + deletePolicySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Policy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PolicyOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listPolicies. */ + public PagedCallSettings.Builder< + ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> + listPoliciesSettings() { + return listPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder getPolicySettings() { + return getPolicySettings; + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public UnaryCallSettings.Builder createPolicySettings() { + return createPolicySettings; + } + + /** Returns the builder for the settings used for calls to createPolicy. */ + public OperationCallSettings.Builder + createPolicyOperationSettings() { + return createPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public OperationCallSettings.Builder + updatePolicyOperationSettings() { + return updatePolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public UnaryCallSettings.Builder deletePolicySettings() { + return deletePolicySettings; + } + + /** Returns the builder for the settings used for calls to deletePolicy. */ + public OperationCallSettings.Builder + deletePolicyOperationSettings() { + return deletePolicyOperationSettings; + } + + @Override + public PoliciesStubSettings build() throws IOException { + return new PoliciesStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsClient.java new file mode 100644 index 000000000000..3698883d934b --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsClient.java @@ -0,0 +1,1905 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v3.stub.PolicyBindingsStub; +import com.google.iam.v3.stub.PolicyBindingsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: An interface for managing Identity and Access Management (IAM) policy + * bindings. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+ *   PolicyBindingName name =
+ *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+ *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+ *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PolicyBindingsClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePolicyBinding

Creates a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. Once the binding is created, the policy is applied to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPolicyBindingAsync(CreatePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPolicyBindingAsync(FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(LocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(String parent, PolicyBinding policyBinding, String policyBindingId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPolicyBindingOperationCallable() + *

  • createPolicyBindingCallable() + *

+ *

GetPolicyBinding

Gets a policy binding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPolicyBinding(GetPolicyBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPolicyBinding(PolicyBindingName name) + *

  • getPolicyBinding(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPolicyBindingCallable() + *

+ *

UpdatePolicyBinding

Updates a policy binding and returns a long-running operation. Callers will need the IAM permissions on the policy and target in the binding to update, and the IAM permission to remove the existing policy from the binding. Target is immutable and cannot be updated. Once the binding is updated, the new policy is applied to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePolicyBindingAsync(UpdatePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updatePolicyBindingAsync(PolicyBinding policyBinding, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePolicyBindingOperationCallable() + *

  • updatePolicyBindingCallable() + *

+ *

DeletePolicyBinding

Deletes a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. Once the binding is deleted, the policy no longer applies to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePolicyBindingAsync(DeletePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePolicyBindingAsync(PolicyBindingName name) + *

  • deletePolicyBindingAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePolicyBindingOperationCallable() + *

  • deletePolicyBindingCallable() + *

+ *

ListPolicyBindings

Lists policy bindings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPolicyBindings(ListPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPolicyBindings(FolderLocationName parent) + *

  • listPolicyBindings(LocationName parent) + *

  • listPolicyBindings(OrganizationLocationName parent) + *

  • listPolicyBindings(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPolicyBindingsPagedCallable() + *

  • listPolicyBindingsCallable() + *

+ *

SearchTargetPolicyBindings

Search policy bindings by target. Returns all policy binding objects bound directly to target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchTargetPolicyBindings(SearchTargetPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • searchTargetPolicyBindings(FolderLocationName parent, String target) + *

  • searchTargetPolicyBindings(LocationName parent, String target) + *

  • searchTargetPolicyBindings(OrganizationLocationName parent, String target) + *

  • searchTargetPolicyBindings(String parent, String target) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchTargetPolicyBindingsPagedCallable() + *

  • searchTargetPolicyBindingsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PolicyBindingsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newHttpJsonBuilder().build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PolicyBindingsClient implements BackgroundResource { + private final PolicyBindingsSettings settings; + private final PolicyBindingsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PolicyBindingsClient with default settings. */ + public static final PolicyBindingsClient create() throws IOException { + return create(PolicyBindingsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PolicyBindingsClient create(PolicyBindingsSettings settings) + throws IOException { + return new PolicyBindingsClient(settings); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(PolicyBindingsSettings). + */ + public static final PolicyBindingsClient create(PolicyBindingsStub stub) { + return new PolicyBindingsClient(stub); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PolicyBindingsClient(PolicyBindingsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PolicyBindingsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PolicyBindingsClient(PolicyBindingsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PolicyBindingsSettings getSettings() { + return settings; + } + + public PolicyBindingsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + LocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + String parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.createPolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + CreatePolicyBindingRequest request) { + return createPolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.createPolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPolicyBindingOperationCallable() { + return stub.createPolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.createPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPolicyBindingCallable() { + return stub.createPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBindingName name =
+   *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to retrieve. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(PolicyBindingName name) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String name =
+   *       PolicyBindingName.ofOrganizationLocationPolicyBindingName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
+   *           .toString();
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to retrieve. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(String name) { + GetPolicyBindingRequest request = GetPolicyBindingRequest.newBuilder().setName(name).build(); + return getPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   GetPolicyBindingRequest request =
+   *       GetPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(GetPolicyBindingRequest request) { + return getPolicyBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   GetPolicyBindingRequest request =
+   *       GetPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.getPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPolicyBindingCallable() { + return stub.getPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PolicyBinding response =
+   *       policyBindingsClient.updatePolicyBindingAsync(policyBinding, updateMask).get();
+   * }
+   * }
+ * + * @param policyBinding Required. The policy binding to update. + *

The policy binding's `name` field is used to identify the policy binding to update. + * @param updateMask Optional. The list of fields to update + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyBindingAsync( + PolicyBinding policyBinding, FieldMask updateMask) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(policyBinding) + .setUpdateMask(updateMask) + .build(); + return updatePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.updatePolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyBindingAsync( + UpdatePolicyBindingRequest request) { + return updatePolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.updatePolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updatePolicyBindingOperationCallable() { + return stub.updatePolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.updatePolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePolicyBindingCallable() { + return stub.updatePolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBindingName name =
+   *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+   *   policyBindingsClient.deletePolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to delete. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync( + PolicyBindingName name) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String name =
+   *       PolicyBindingName.ofOrganizationLocationPolicyBindingName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
+   *           .toString();
+   *   policyBindingsClient.deletePolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to delete. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync(String name) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder().setName(name).build(); + return deletePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   policyBindingsClient.deletePolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync( + DeletePolicyBindingRequest request) { + return deletePolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.deletePolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePolicyBindingOperationCallable() { + return stub.deletePolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.deletePolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePolicyBindingCallable() { + return stub.deletePolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(FolderLocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(LocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(OrganizationLocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(String parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder().setParent(parent).build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings( + ListPolicyBindingsRequest request) { + return listPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.listPolicyBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBindingsPagedCallable() { + return stub.listPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListPolicyBindingsResponse response =
+   *         policyBindingsClient.listPolicyBindingsCallable().call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBindingsCallable() { + return stub.listPolicyBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + FolderLocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + LocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + OrganizationLocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + String parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder().setParent(parent).setTarget(target).build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + SearchTargetPolicyBindingsRequest request) { + return searchTargetPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.searchTargetPolicyBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable() { + return stub.searchTargetPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   while (true) {
+   *     SearchTargetPolicyBindingsResponse response =
+   *         policyBindingsClient.searchTargetPolicyBindingsCallable().call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchTargetPolicyBindingsCallable() { + return stub.searchTargetPolicyBindingsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage, + ListPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPolicyBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPolicyBindingsPagedResponse(ListPolicyBindingsPage page) { + super(page, ListPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPolicyBindingsPage + extends AbstractPage< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage> { + + private ListPolicyBindingsPage( + PageContext context, + ListPolicyBindingsResponse response) { + super(context, response); + } + + private static ListPolicyBindingsPage createEmptyPage() { + return new ListPolicyBindingsPage(null, null); + } + + @Override + protected ListPolicyBindingsPage createPage( + PageContext context, + ListPolicyBindingsResponse response) { + return new ListPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage, + ListPolicyBindingsFixedSizeCollection> { + + private ListPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPolicyBindingsFixedSizeCollection createEmptyCollection() { + return new ListPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPolicyBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchTargetPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage, + SearchTargetPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchTargetPolicyBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchTargetPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchTargetPolicyBindingsPagedResponse(SearchTargetPolicyBindingsPage page) { + super(page, SearchTargetPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchTargetPolicyBindingsPage + extends AbstractPage< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage> { + + private SearchTargetPolicyBindingsPage( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + SearchTargetPolicyBindingsResponse response) { + super(context, response); + } + + private static SearchTargetPolicyBindingsPage createEmptyPage() { + return new SearchTargetPolicyBindingsPage(null, null); + } + + @Override + protected SearchTargetPolicyBindingsPage createPage( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + SearchTargetPolicyBindingsResponse response) { + return new SearchTargetPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchTargetPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage, + SearchTargetPolicyBindingsFixedSizeCollection> { + + private SearchTargetPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchTargetPolicyBindingsFixedSizeCollection createEmptyCollection() { + return new SearchTargetPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected SearchTargetPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchTargetPolicyBindingsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsSettings.java new file mode 100644 index 000000000000..c906bf2e7d94 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PolicyBindingsSettings.java @@ -0,0 +1,352 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v3.stub.PolicyBindingsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyBindingsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsSettings.newBuilder();
+ * policyBindingsSettingsBuilder
+ *     .getPolicyBindingSettings()
+ *     .setRetrySettings(
+ *         policyBindingsSettingsBuilder
+ *             .getPolicyBindingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBindingsSettings policyBindingsSettings = policyBindingsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBindingsSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PolicyBindingsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings createPolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).createPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public OperationCallSettings + createPolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).createPolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings getPolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).getPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings updatePolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).updatePolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings + updatePolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).updatePolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings deletePolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).deletePolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings + deletePolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).deletePolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to listPolicyBindings. */ + public PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).listPolicyBindingsSettings(); + } + + /** Returns the object with the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).searchTargetPolicyBindingsSettings(); + } + + public static final PolicyBindingsSettings create(PolicyBindingsStubSettings stub) + throws IOException { + return new PolicyBindingsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PolicyBindingsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PolicyBindingsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PolicyBindingsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PolicyBindingsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PolicyBindingsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PolicyBindingsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PolicyBindingsStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyBindingsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyBindingsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PolicyBindingsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PolicyBindingsStubSettings.newBuilder(clientContext)); + } + + protected Builder(PolicyBindingsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PolicyBindingsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PolicyBindingsStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PolicyBindingsStubSettings.newHttpJsonBuilder()); + } + + public PolicyBindingsStubSettings.Builder getStubSettingsBuilder() { + return ((PolicyBindingsStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings.Builder + createPolicyBindingSettings() { + return getStubSettingsBuilder().createPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings() { + return getStubSettingsBuilder().createPolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings.Builder + getPolicyBindingSettings() { + return getStubSettingsBuilder().getPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings.Builder + updatePolicyBindingSettings() { + return getStubSettingsBuilder().updatePolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings() { + return getStubSettingsBuilder().updatePolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings.Builder + deletePolicyBindingSettings() { + return getStubSettingsBuilder().deletePolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings.Builder + deletePolicyBindingOperationSettings() { + return getStubSettingsBuilder().deletePolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listPolicyBindings. */ + public PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return getStubSettingsBuilder().listPolicyBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return getStubSettingsBuilder().searchTargetPolicyBindingsSettings(); + } + + @Override + public PolicyBindingsSettings build() throws IOException { + return new PolicyBindingsSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClient.java new file mode 100644 index 000000000000..f2fedfe57573 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClient.java @@ -0,0 +1,1647 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v3.stub.PrincipalAccessBoundaryPoliciesStub; +import com.google.iam.v3.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages Identity and Access Management (IAM) principal access boundary + * policies. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create()) {
+ *   PrincipalAccessBoundaryPolicyName name =
+ *       PrincipalAccessBoundaryPolicyName.of(
+ *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+ *   PrincipalAccessBoundaryPolicy response =
+ *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PrincipalAccessBoundaryPoliciesClient object to clean + * up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePrincipalAccessBoundaryPolicy

Creates a principal access boundary policy, and returns a long running operation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyAsync(CreatePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyAsync(OrganizationLocationName parent, PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, String principalAccessBoundaryPolicyId) + *

  • createPrincipalAccessBoundaryPolicyAsync(String parent, PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, String principalAccessBoundaryPolicyId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyOperationCallable() + *

  • createPrincipalAccessBoundaryPolicyCallable() + *

+ *

GetPrincipalAccessBoundaryPolicy

Gets a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPrincipalAccessBoundaryPolicy(GetPrincipalAccessBoundaryPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicyName name) + *

  • getPrincipalAccessBoundaryPolicy(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPrincipalAccessBoundaryPolicyCallable() + *

+ *

UpdatePrincipalAccessBoundaryPolicy

Updates a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyAsync(UpdatePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyAsync(PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyOperationCallable() + *

  • updatePrincipalAccessBoundaryPolicyCallable() + *

+ *

DeletePrincipalAccessBoundaryPolicy

Deletes a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyAsync(DeletePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyAsync(PrincipalAccessBoundaryPolicyName name) + *

  • deletePrincipalAccessBoundaryPolicyAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyOperationCallable() + *

  • deletePrincipalAccessBoundaryPolicyCallable() + *

+ *

ListPrincipalAccessBoundaryPolicies

Lists principal access boundary policies.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPrincipalAccessBoundaryPolicies(ListPrincipalAccessBoundaryPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPrincipalAccessBoundaryPolicies(OrganizationLocationName parent) + *

  • listPrincipalAccessBoundaryPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPrincipalAccessBoundaryPoliciesPagedCallable() + *

  • listPrincipalAccessBoundaryPoliciesCallable() + *

+ *

SearchPrincipalAccessBoundaryPolicyBindings

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindings(SearchPrincipalAccessBoundaryPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindings(PrincipalAccessBoundaryPolicyName name) + *

  • searchPrincipalAccessBoundaryPolicyBindings(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() + *

  • searchPrincipalAccessBoundaryPolicyBindingsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * PrincipalAccessBoundaryPoliciesSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder().build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClient implements BackgroundResource { + private final PrincipalAccessBoundaryPoliciesSettings settings; + private final PrincipalAccessBoundaryPoliciesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PrincipalAccessBoundaryPoliciesClient with default settings. */ + public static final PrincipalAccessBoundaryPoliciesClient create() throws IOException { + return create(PrincipalAccessBoundaryPoliciesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final PrincipalAccessBoundaryPoliciesClient create( + PrincipalAccessBoundaryPoliciesSettings settings) throws IOException { + return new PrincipalAccessBoundaryPoliciesClient(settings); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(PrincipalAccessBoundaryPoliciesSettings). + */ + public static final PrincipalAccessBoundaryPoliciesClient create( + PrincipalAccessBoundaryPoliciesStub stub) { + return new PrincipalAccessBoundaryPoliciesClient(stub); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected PrincipalAccessBoundaryPoliciesClient(PrincipalAccessBoundaryPoliciesSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((PrincipalAccessBoundaryPoliciesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PrincipalAccessBoundaryPoliciesClient(PrincipalAccessBoundaryPoliciesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PrincipalAccessBoundaryPoliciesSettings getSettings() { + return settings; + } + + public PrincipalAccessBoundaryPoliciesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175";
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(
+   *               parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this principal access boundary policy will be + * created. Only organizations are supported. + *

Format: `organizations/{organization_id}/locations/{location}` + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to create. + * @param principalAccessBoundaryPolicyId Required. The ID to use for the principal access + * boundary policy, which will become the final component of the principal access boundary + * policy's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync( + OrganizationLocationName parent, + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, + String principalAccessBoundaryPolicyId) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setPrincipalAccessBoundaryPolicyId(principalAccessBoundaryPolicyId) + .build(); + return createPrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175";
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(
+   *               parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this principal access boundary policy will be + * created. Only organizations are supported. + *

Format: `organizations/{organization_id}/locations/{location}` + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to create. + * @param principalAccessBoundaryPolicyId Required. The ID to use for the principal access + * boundary policy, which will become the final component of the principal access boundary + * policy's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync( + String parent, + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, + String principalAccessBoundaryPolicyId) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(parent) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setPrincipalAccessBoundaryPolicyId(principalAccessBoundaryPolicyId) + .build(); + return createPrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(request)
+   *           .get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync(CreatePrincipalAccessBoundaryPolicyRequest request) { + return createPrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return stub.createPrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return stub.createPrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to retrieve. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + PrincipalAccessBoundaryPolicyName name) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPrincipalAccessBoundaryPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to retrieve. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(String name) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder().setName(name).build(); + return getPrincipalAccessBoundaryPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   GetPrincipalAccessBoundaryPolicyRequest request =
+   *       GetPrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + GetPrincipalAccessBoundaryPolicyRequest request) { + return getPrincipalAccessBoundaryPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   GetPrincipalAccessBoundaryPolicyRequest request =
+   *       GetPrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .getPrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return stub.getPrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to update. + *

The principal access boundary policy's `name` field is used to identify the policy to + * update. + * @param updateMask Optional. The list of fields to update + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePrincipalAccessBoundaryPolicyAsync( + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, FieldMask updateMask) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setUpdateMask(updateMask) + .build(); + return updatePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyAsync(request)
+   *           .get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePrincipalAccessBoundaryPolicyAsync(UpdatePrincipalAccessBoundaryPolicyRequest request) { + return updatePrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return stub.updatePrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return stub.updatePrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to delete. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + PrincipalAccessBoundaryPolicyName name) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to delete. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + String name) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder().setName(name).build(); + return deletePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + DeletePrincipalAccessBoundaryPolicyRequest request) { + return deletePrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .deletePrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return stub.deletePrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .deletePrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return stub.deletePrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of principal access + * boundary policies. + *

Format: `organizations/{organization_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + OrganizationLocationName parent) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPrincipalAccessBoundaryPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of principal access + * boundary policies. + *

Format: `organizations/{organization_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + String parent) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder().setParent(parent).build(); + return listPrincipalAccessBoundaryPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(request)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest request) { + return listPrincipalAccessBoundaryPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPoliciesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (PrincipalAccessBoundaryPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return stub.listPrincipalAccessBoundaryPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPrincipalAccessBoundaryPoliciesResponse response =
+   *         principalAccessBoundaryPoliciesClient
+   *             .listPrincipalAccessBoundaryPoliciesCallable()
+   *             .call(request);
+   *     for (PrincipalAccessBoundaryPolicy element :
+   *         response.getPrincipalAccessBoundaryPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return stub.listPrincipalAccessBoundaryPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(name)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy. Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings(PrincipalAccessBoundaryPolicyName name) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return searchPrincipalAccessBoundaryPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(name)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy. Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings(String name) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder().setName(name).build(); + return searchPrincipalAccessBoundaryPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(request)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindingsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return stub.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchPrincipalAccessBoundaryPolicyBindingsResponse response =
+   *         principalAccessBoundaryPoliciesClient
+   *             .searchPrincipalAccessBoundaryPolicyBindingsCallable()
+   *             .call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return stub.searchPrincipalAccessBoundaryPolicyBindingsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPrincipalAccessBoundaryPoliciesPagedResponse + extends AbstractPagedListResponse< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage, + ListPrincipalAccessBoundaryPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPrincipalAccessBoundaryPoliciesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPrincipalAccessBoundaryPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPrincipalAccessBoundaryPoliciesPagedResponse( + ListPrincipalAccessBoundaryPoliciesPage page) { + super(page, ListPrincipalAccessBoundaryPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPrincipalAccessBoundaryPoliciesPage + extends AbstractPage< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage> { + + private ListPrincipalAccessBoundaryPoliciesPage( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ListPrincipalAccessBoundaryPoliciesResponse response) { + super(context, response); + } + + private static ListPrincipalAccessBoundaryPoliciesPage createEmptyPage() { + return new ListPrincipalAccessBoundaryPoliciesPage(null, null); + } + + @Override + protected ListPrincipalAccessBoundaryPoliciesPage createPage( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ListPrincipalAccessBoundaryPoliciesResponse response) { + return new ListPrincipalAccessBoundaryPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPrincipalAccessBoundaryPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage, + ListPrincipalAccessBoundaryPoliciesFixedSizeCollection> { + + private ListPrincipalAccessBoundaryPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPrincipalAccessBoundaryPoliciesFixedSizeCollection createEmptyCollection() { + return new ListPrincipalAccessBoundaryPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListPrincipalAccessBoundaryPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPrincipalAccessBoundaryPoliciesFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchPrincipalAccessBoundaryPolicyBindingsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse( + SearchPrincipalAccessBoundaryPolicyBindingsPage page) { + super( + page, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsPage + extends AbstractPage< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage> { + + private SearchPrincipalAccessBoundaryPolicyBindingsPage( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + SearchPrincipalAccessBoundaryPolicyBindingsResponse response) { + super(context, response); + } + + private static SearchPrincipalAccessBoundaryPolicyBindingsPage createEmptyPage() { + return new SearchPrincipalAccessBoundaryPolicyBindingsPage(null, null); + } + + @Override + protected SearchPrincipalAccessBoundaryPolicyBindingsPage createPage( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + SearchPrincipalAccessBoundaryPolicyBindingsResponse response) { + return new SearchPrincipalAccessBoundaryPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection> { + + private SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection + createEmptyCollection() { + return new SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection( + pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesSettings.java new file mode 100644 index 000000000000..0155296265fb --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesSettings.java @@ -0,0 +1,404 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v3.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PrincipalAccessBoundaryPoliciesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder();
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .getPrincipalAccessBoundaryPolicySettings()
+ *     .setRetrySettings(
+ *         principalAccessBoundaryPoliciesSettingsBuilder
+ *             .getPrincipalAccessBoundaryPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     principalAccessBoundaryPoliciesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .createPrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .createPrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + getPrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .getPrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .updatePrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .updatePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .deletePrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .deletePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to listPrincipalAccessBoundaryPolicies. */ + public PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .listPrincipalAccessBoundaryPoliciesSettings(); + } + + /** + * Returns the object with the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .searchPrincipalAccessBoundaryPolicyBindingsSettings(); + } + + public static final PrincipalAccessBoundaryPoliciesSettings create( + PrincipalAccessBoundaryPoliciesStubSettings stub) throws IOException { + return new PrincipalAccessBoundaryPoliciesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PrincipalAccessBoundaryPoliciesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PrincipalAccessBoundaryPoliciesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PrincipalAccessBoundaryPoliciesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PrincipalAccessBoundaryPoliciesSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(clientContext)); + } + + protected Builder(PrincipalAccessBoundaryPoliciesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PrincipalAccessBoundaryPoliciesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PrincipalAccessBoundaryPoliciesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder()); + } + + public PrincipalAccessBoundaryPoliciesStubSettings.Builder getStubSettingsBuilder() { + return ((PrincipalAccessBoundaryPoliciesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().createPrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().createPrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().getPrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().updatePrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().updatePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().deletePrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().deletePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to listPrincipalAccessBoundaryPolicies. + */ + public PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return getStubSettingsBuilder().listPrincipalAccessBoundaryPoliciesSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return getStubSettingsBuilder().searchPrincipalAccessBoundaryPolicyBindingsSettings(); + } + + @Override + public PrincipalAccessBoundaryPoliciesSettings build() throws IOException { + return new PrincipalAccessBoundaryPoliciesSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/gapic_metadata.json b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/gapic_metadata.json new file mode 100644 index 000000000000..5c741122324a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.iam.v3", + "libraryPackage": "com.google.iam.v3", + "services": { + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "PolicyBindingsClient", + "rpcs": { + "CreatePolicyBinding": { + "methods": ["createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingOperationCallable", "createPolicyBindingCallable"] + }, + "DeletePolicyBinding": { + "methods": ["deletePolicyBindingAsync", "deletePolicyBindingAsync", "deletePolicyBindingAsync", "deletePolicyBindingOperationCallable", "deletePolicyBindingCallable"] + }, + "GetPolicyBinding": { + "methods": ["getPolicyBinding", "getPolicyBinding", "getPolicyBinding", "getPolicyBindingCallable"] + }, + "ListPolicyBindings": { + "methods": ["listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindingsPagedCallable", "listPolicyBindingsCallable"] + }, + "SearchTargetPolicyBindings": { + "methods": ["searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindingsPagedCallable", "searchTargetPolicyBindingsCallable"] + }, + "UpdatePolicyBinding": { + "methods": ["updatePolicyBindingAsync", "updatePolicyBindingAsync", "updatePolicyBindingOperationCallable", "updatePolicyBindingCallable"] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "PrincipalAccessBoundaryPoliciesClient", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": ["createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyOperationCallable", "createPrincipalAccessBoundaryPolicyCallable"] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": ["deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyOperationCallable", "deletePrincipalAccessBoundaryPolicyCallable"] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": ["getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicyCallable"] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": ["listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPoliciesPagedCallable", "listPrincipalAccessBoundaryPoliciesCallable"] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": ["searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindingsPagedCallable", "searchPrincipalAccessBoundaryPolicyBindingsCallable"] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": ["updatePrincipalAccessBoundaryPolicyAsync", "updatePrincipalAccessBoundaryPolicyAsync", "updatePrincipalAccessBoundaryPolicyOperationCallable", "updatePrincipalAccessBoundaryPolicyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/package-info.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/package-info.java new file mode 100644 index 000000000000..f41d7c28c888 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/package-info.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +/** + * A client to Identity and Access Management (IAM) API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= PolicyBindingsClient ======================= + * + *

Service Description: An interface for managing Identity and Access Management (IAM) policy + * bindings. + * + *

Sample for PolicyBindingsClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+ *   PolicyBindingName name =
+ *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+ *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+ *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+ * }
+ * }
+ * + *

======================= PrincipalAccessBoundaryPoliciesClient ======================= + * + *

Service Description: Manages Identity and Access Management (IAM) principal access boundary + * policies. + * + *

Sample for PrincipalAccessBoundaryPoliciesClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create()) {
+ *   PrincipalAccessBoundaryPolicyName name =
+ *       PrincipalAccessBoundaryPolicyName.of(
+ *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+ *   PrincipalAccessBoundaryPolicy response =
+ *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.iam.v3; + +import javax.annotation.Generated; diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsCallableFactory.java new file mode 100644 index 000000000000..35e716541277 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PolicyBindings service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyBindingsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsStub.java new file mode 100644 index 000000000000..009deac57c2d --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPolicyBindingsStub.java @@ -0,0 +1,423 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.ListPolicyBindingsResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyBindingsStub extends PolicyBindingsStub { + private static final MethodDescriptor + createPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/CreatePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/GetPolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/UpdatePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/DeletePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listPolicyBindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/ListPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindingsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3.PolicyBindings/SearchTargetPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchTargetPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchTargetPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createPolicyBindingCallable; + private final OperationCallable + createPolicyBindingOperationCallable; + private final UnaryCallable getPolicyBindingCallable; + private final UnaryCallable updatePolicyBindingCallable; + private final OperationCallable + updatePolicyBindingOperationCallable; + private final UnaryCallable deletePolicyBindingCallable; + private final OperationCallable + deletePolicyBindingOperationCallable; + private final UnaryCallable + listPolicyBindingsCallable; + private final UnaryCallable + listPolicyBindingsPagedCallable; + private final UnaryCallable + searchTargetPolicyBindingsCallable; + private final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPolicyBindingsStub create(PolicyBindingsStubSettings settings) + throws IOException { + return new GrpcPolicyBindingsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPolicyBindingsStub create(ClientContext clientContext) + throws IOException { + return new GrpcPolicyBindingsStub( + PolicyBindingsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPolicyBindingsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPolicyBindingsStub( + PolicyBindingsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPolicyBindingsStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyBindingsStub(PolicyBindingsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPolicyBindingsCallableFactory()); + } + + /** + * Constructs an instance of GrpcPolicyBindingsStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyBindingsStub( + PolicyBindingsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createPolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getPolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updatePolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "policy_binding.name", String.valueOf(request.getPolicyBinding().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listPolicyBindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + searchTargetPolicyBindingsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(searchTargetPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createPolicyBindingCallable = + callableFactory.createUnaryCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingSettings(), + clientContext); + this.createPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.getPolicyBindingCallable = + callableFactory.createUnaryCallable( + getPolicyBindingTransportSettings, settings.getPolicyBindingSettings(), clientContext); + this.updatePolicyBindingCallable = + callableFactory.createUnaryCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingSettings(), + clientContext); + this.updatePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.deletePolicyBindingCallable = + callableFactory.createUnaryCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingSettings(), + clientContext); + this.deletePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.listPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.listPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createPolicyBindingCallable() { + return createPolicyBindingCallable; + } + + @Override + public OperationCallable + createPolicyBindingOperationCallable() { + return createPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable getPolicyBindingCallable() { + return getPolicyBindingCallable; + } + + @Override + public UnaryCallable updatePolicyBindingCallable() { + return updatePolicyBindingCallable; + } + + @Override + public OperationCallable + updatePolicyBindingOperationCallable() { + return updatePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable deletePolicyBindingCallable() { + return deletePolicyBindingCallable; + } + + @Override + public OperationCallable + deletePolicyBindingOperationCallable() { + return deletePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsCallable() { + return listPolicyBindingsCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsPagedCallable() { + return listPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsCallable() { + return searchTargetPolicyBindingsCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + return searchTargetPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java new file mode 100644 index 000000000000..97442bac46bb --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPrincipalAccessBoundaryPoliciesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..9795fb580dc9 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,502 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPrincipalAccessBoundaryPoliciesStub extends PrincipalAccessBoundaryPoliciesStub { + private static final MethodDescriptor + createPrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/CreatePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/GetPrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PrincipalAccessBoundaryPolicy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/UpdatePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/DeletePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/ListPrincipalAccessBoundaryPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/SearchPrincipalAccessBoundaryPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller( + SearchPrincipalAccessBoundaryPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + SearchPrincipalAccessBoundaryPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyCallable; + private final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create( + PrincipalAccessBoundaryPoliciesStubSettings settings) throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create(ClientContext clientContext) + throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcPrincipalAccessBoundaryPoliciesStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPrincipalAccessBoundaryPoliciesCallableFactory()); + } + + /** + * Constructs an instance of GrpcPrincipalAccessBoundaryPoliciesStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createPrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getPrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(getPrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + updatePrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "principal_access_boundary_policy.name", + String.valueOf(request.getPrincipalAccessBoundaryPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deletePrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listPrincipalAccessBoundaryPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.createPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.createPrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.getPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + getPrincipalAccessBoundaryPolicyTransportSettings, + settings.getPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.deletePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.deletePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.listPrincipalAccessBoundaryPoliciesCallable = + callableFactory.createUnaryCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.listPrincipalAccessBoundaryPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return createPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return createPrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return getPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return updatePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return updatePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return deletePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return deletePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return listPrincipalAccessBoundaryPoliciesCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return listPrincipalAccessBoundaryPoliciesPagedCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsCallableFactory.java new file mode 100644 index 000000000000..4036c8ef212d --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the PolicyBindings service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPolicyBindingsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsStub.java new file mode 100644 index 000000000000..8f9610a50dc9 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPolicyBindingsStub.java @@ -0,0 +1,668 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.ListPolicyBindingsResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPolicyBindingsStub extends PolicyBindingsStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(PolicyBinding.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createPolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/CreatePolicyBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*}/policyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3/{parent=folders/*/locations/*}/policyBindings", + "/v3/{parent=organizations/*/locations/*}/policyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "policyBindingId", request.getPolicyBindingId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policyBinding", request.getPolicyBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getPolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/GetPolicyBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v3/{name=folders/*/locations/*/policyBindings/*}", + "/v3/{name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PolicyBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/UpdatePolicyBinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{policyBinding.name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policyBinding.name", request.getPolicyBinding().getName()); + return fields; + }) + .setAdditionalPaths( + "/v3/{policyBinding.name=folders/*/locations/*/policyBindings/*}", + "/v3/{policyBinding.name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policyBinding", request.getPolicyBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/DeletePolicyBinding") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v3/{name=folders/*/locations/*/policyBindings/*}", + "/v3/{name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listPolicyBindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/ListPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*}/policyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3/{parent=folders/*/locations/*}/policyBindings", + "/v3/{parent=organizations/*/locations/*}/policyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.iam.v3.PolicyBindings/SearchTargetPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindings", + "/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "target", request.getTarget()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchTargetPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createPolicyBindingCallable; + private final OperationCallable + createPolicyBindingOperationCallable; + private final UnaryCallable getPolicyBindingCallable; + private final UnaryCallable updatePolicyBindingCallable; + private final OperationCallable + updatePolicyBindingOperationCallable; + private final UnaryCallable deletePolicyBindingCallable; + private final OperationCallable + deletePolicyBindingOperationCallable; + private final UnaryCallable + listPolicyBindingsCallable; + private final UnaryCallable + listPolicyBindingsPagedCallable; + private final UnaryCallable + searchTargetPolicyBindingsCallable; + private final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPolicyBindingsStub create(PolicyBindingsStubSettings settings) + throws IOException { + return new HttpJsonPolicyBindingsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPolicyBindingsStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPolicyBindingsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPolicyBindingsStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonPolicyBindingsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPolicyBindingsStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + createPolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getPolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + updatePolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "policy_binding.name", + String.valueOf(request.getPolicyBinding().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listPolicyBindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + searchTargetPolicyBindingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchTargetPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createPolicyBindingCallable = + callableFactory.createUnaryCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingSettings(), + clientContext); + this.createPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getPolicyBindingCallable = + callableFactory.createUnaryCallable( + getPolicyBindingTransportSettings, settings.getPolicyBindingSettings(), clientContext); + this.updatePolicyBindingCallable = + callableFactory.createUnaryCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingSettings(), + clientContext); + this.updatePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePolicyBindingCallable = + callableFactory.createUnaryCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingSettings(), + clientContext); + this.deletePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.listPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPolicyBindingMethodDescriptor); + methodDescriptors.add(getPolicyBindingMethodDescriptor); + methodDescriptors.add(updatePolicyBindingMethodDescriptor); + methodDescriptors.add(deletePolicyBindingMethodDescriptor); + methodDescriptors.add(listPolicyBindingsMethodDescriptor); + methodDescriptors.add(searchTargetPolicyBindingsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createPolicyBindingCallable() { + return createPolicyBindingCallable; + } + + @Override + public OperationCallable + createPolicyBindingOperationCallable() { + return createPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable getPolicyBindingCallable() { + return getPolicyBindingCallable; + } + + @Override + public UnaryCallable updatePolicyBindingCallable() { + return updatePolicyBindingCallable; + } + + @Override + public OperationCallable + updatePolicyBindingOperationCallable() { + return updatePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable deletePolicyBindingCallable() { + return deletePolicyBindingCallable; + } + + @Override + public OperationCallable + deletePolicyBindingOperationCallable() { + return deletePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsCallable() { + return listPolicyBindingsCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsPagedCallable() { + return listPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsCallable() { + return searchTargetPolicyBindingsCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + return searchTargetPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java new file mode 100644 index 000000000000..4f13e16dd0f0 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..d872adbf00fb --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,736 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPrincipalAccessBoundaryPoliciesStub + extends PrincipalAccessBoundaryPoliciesStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(PrincipalAccessBoundaryPolicy.getDescriptor()) + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createPrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/CreatePrincipalAccessBoundaryPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "principalAccessBoundaryPolicyId", + request.getPrincipalAccessBoundaryPolicyId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "principalAccessBoundaryPolicy", + request.getPrincipalAccessBoundaryPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/GetPrincipalAccessBoundaryPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PrincipalAccessBoundaryPolicy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/UpdatePrincipalAccessBoundaryPolicy") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3/{principalAccessBoundaryPolicy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "principalAccessBoundaryPolicy.name", + request.getPrincipalAccessBoundaryPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "principalAccessBoundaryPolicy", + request.getPrincipalAccessBoundaryPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/DeletePrincipalAccessBoundaryPolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/ListPrincipalAccessBoundaryPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.iam.v3.PrincipalAccessBoundaryPolicies/SearchPrincipalAccessBoundaryPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + SearchPrincipalAccessBoundaryPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyCallable; + private final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + PrincipalAccessBoundaryPoliciesStubSettings settings) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonPrincipalAccessBoundaryPoliciesStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPrincipalAccessBoundaryPoliciesStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + createPrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getPrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(getPrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + updatePrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "principal_access_boundary_policy.name", + String.valueOf(request.getPrincipalAccessBoundaryPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listPrincipalAccessBoundaryPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.createPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.createPrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + getPrincipalAccessBoundaryPolicyTransportSettings, + settings.getPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.deletePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listPrincipalAccessBoundaryPoliciesCallable = + callableFactory.createUnaryCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.listPrincipalAccessBoundaryPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(getPrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(updatePrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(deletePrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(listPrincipalAccessBoundaryPoliciesMethodDescriptor); + methodDescriptors.add(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return createPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return createPrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return getPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return updatePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return updatePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return deletePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return deletePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return listPrincipalAccessBoundaryPoliciesCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return listPrincipalAccessBoundaryPoliciesPagedCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStub.java new file mode 100644 index 000000000000..f3125d573d5c --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStub.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.ListPolicyBindingsResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PolicyBindingsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createPolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPolicyBindingOperationCallable()"); + } + + public UnaryCallable createPolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyBindingCallable()"); + } + + public UnaryCallable getPolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyBindingCallable()"); + } + + public OperationCallable + updatePolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePolicyBindingOperationCallable()"); + } + + public UnaryCallable updatePolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyBindingCallable()"); + } + + public OperationCallable + deletePolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePolicyBindingOperationCallable()"); + } + + public UnaryCallable deletePolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyBindingCallable()"); + } + + public UnaryCallable + listPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyBindingsPagedCallable()"); + } + + public UnaryCallable + listPolicyBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyBindingsCallable()"); + } + + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchTargetPolicyBindingsPagedCallable()"); + } + + public UnaryCallable + searchTargetPolicyBindingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchTargetPolicyBindingsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStubSettings.java new file mode 100644 index 000000000000..6fa064578845 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PolicyBindingsStubSettings.java @@ -0,0 +1,834 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.ListPolicyBindingsResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyBindingsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsStubSettings.newBuilder();
+ * policyBindingsSettingsBuilder
+ *     .getPolicyBindingSettings()
+ *     .setRetrySettings(
+ *         policyBindingsSettingsBuilder
+ *             .getPolicyBindingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBindingsStubSettings policyBindingsSettings = policyBindingsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBindingsSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PolicyBindingsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createPolicyBindingSettings; + private final OperationCallSettings + createPolicyBindingOperationSettings; + private final UnaryCallSettings getPolicyBindingSettings; + private final UnaryCallSettings + updatePolicyBindingSettings; + private final OperationCallSettings + updatePolicyBindingOperationSettings; + private final UnaryCallSettings + deletePolicyBindingSettings; + private final OperationCallSettings + deletePolicyBindingOperationSettings; + private final PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings; + private final PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings; + + private static final PagedListDescriptor< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, PolicyBinding> + LIST_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPolicyBindingsRequest injectToken( + ListPolicyBindingsRequest payload, String token) { + return ListPolicyBindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPolicyBindingsRequest injectPageSize( + ListPolicyBindingsRequest payload, int pageSize) { + return ListPolicyBindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse, PolicyBinding> + SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchTargetPolicyBindingsRequest injectToken( + SearchTargetPolicyBindingsRequest payload, String token) { + return SearchTargetPolicyBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchTargetPolicyBindingsRequest injectPageSize( + SearchTargetPolicyBindingsRequest payload, int pageSize) { + return SearchTargetPolicyBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(SearchTargetPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchTargetPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchTargetPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListResponseFactory< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + LIST_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + ListPolicyBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_POLICY_BINDINGS_PAGE_STR_DESC, request, context); + return ListPolicyBindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + SearchTargetPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + pageContext = + PageContext.create( + callable, SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_DESC, request, context); + return SearchTargetPolicyBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings createPolicyBindingSettings() { + return createPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public OperationCallSettings + createPolicyBindingOperationSettings() { + return createPolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings getPolicyBindingSettings() { + return getPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings updatePolicyBindingSettings() { + return updatePolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings + updatePolicyBindingOperationSettings() { + return updatePolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings deletePolicyBindingSettings() { + return deletePolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings + deletePolicyBindingOperationSettings() { + return deletePolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to listPolicyBindings. */ + public PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return listPolicyBindingsSettings; + } + + /** Returns the object with the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return searchTargetPolicyBindingsSettings; + } + + public PolicyBindingsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPolicyBindingsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPolicyBindingsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyBindingsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyBindingsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyBindingsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyBindingsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createPolicyBindingSettings = settingsBuilder.createPolicyBindingSettings().build(); + createPolicyBindingOperationSettings = + settingsBuilder.createPolicyBindingOperationSettings().build(); + getPolicyBindingSettings = settingsBuilder.getPolicyBindingSettings().build(); + updatePolicyBindingSettings = settingsBuilder.updatePolicyBindingSettings().build(); + updatePolicyBindingOperationSettings = + settingsBuilder.updatePolicyBindingOperationSettings().build(); + deletePolicyBindingSettings = settingsBuilder.deletePolicyBindingSettings().build(); + deletePolicyBindingOperationSettings = + settingsBuilder.deletePolicyBindingOperationSettings().build(); + listPolicyBindingsSettings = settingsBuilder.listPolicyBindingsSettings().build(); + searchTargetPolicyBindingsSettings = + settingsBuilder.searchTargetPolicyBindingsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PolicyBindingsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createPolicyBindingSettings; + private final OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings; + private final UnaryCallSettings.Builder + getPolicyBindingSettings; + private final UnaryCallSettings.Builder + updatePolicyBindingSettings; + private final OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings; + private final UnaryCallSettings.Builder + deletePolicyBindingSettings; + private final OperationCallSettings.Builder< + DeletePolicyBindingRequest, Empty, OperationMetadata> + deletePolicyBindingOperationSettings; + private final PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings; + private final PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + getPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + deletePolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + listPolicyBindingsSettings = PagedCallSettings.newBuilder(LIST_POLICY_BINDINGS_PAGE_STR_FACT); + searchTargetPolicyBindingsSettings = + PagedCallSettings.newBuilder(SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPolicyBindingSettings, + getPolicyBindingSettings, + updatePolicyBindingSettings, + deletePolicyBindingSettings, + listPolicyBindingsSettings, + searchTargetPolicyBindingsSettings); + initDefaults(this); + } + + protected Builder(PolicyBindingsStubSettings settings) { + super(settings); + + createPolicyBindingSettings = settings.createPolicyBindingSettings.toBuilder(); + createPolicyBindingOperationSettings = + settings.createPolicyBindingOperationSettings.toBuilder(); + getPolicyBindingSettings = settings.getPolicyBindingSettings.toBuilder(); + updatePolicyBindingSettings = settings.updatePolicyBindingSettings.toBuilder(); + updatePolicyBindingOperationSettings = + settings.updatePolicyBindingOperationSettings.toBuilder(); + deletePolicyBindingSettings = settings.deletePolicyBindingSettings.toBuilder(); + deletePolicyBindingOperationSettings = + settings.deletePolicyBindingOperationSettings.toBuilder(); + listPolicyBindingsSettings = settings.listPolicyBindingsSettings.toBuilder(); + searchTargetPolicyBindingsSettings = settings.searchTargetPolicyBindingsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPolicyBindingSettings, + getPolicyBindingSettings, + updatePolicyBindingSettings, + deletePolicyBindingSettings, + listPolicyBindingsSettings, + searchTargetPolicyBindingsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchTargetPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings.Builder + createPolicyBindingSettings() { + return createPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings() { + return createPolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings.Builder + getPolicyBindingSettings() { + return getPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings.Builder + updatePolicyBindingSettings() { + return updatePolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings() { + return updatePolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings.Builder + deletePolicyBindingSettings() { + return deletePolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings.Builder + deletePolicyBindingOperationSettings() { + return deletePolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to listPolicyBindings. */ + public PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return listPolicyBindingsSettings; + } + + /** Returns the builder for the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return searchTargetPolicyBindingsSettings; + } + + @Override + public PolicyBindingsStubSettings build() throws IOException { + return new PolicyBindingsStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..e2b023d6b35a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PrincipalAccessBoundaryPoliciesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPrincipalAccessBoundaryPolicyCallable()"); + } + + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: getPrincipalAccessBoundaryPolicyCallable()"); + } + + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePrincipalAccessBoundaryPolicyCallable()"); + } + + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePrincipalAccessBoundaryPolicyCallable()"); + } + + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPrincipalAccessBoundaryPoliciesPagedCallable()"); + } + + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPrincipalAccessBoundaryPoliciesCallable()"); + } + + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchPrincipalAccessBoundaryPolicyBindingsPagedCallable()"); + } + + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchPrincipalAccessBoundaryPolicyBindingsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStubSettings.java new file mode 100644 index 000000000000..2f1446fb1560 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3/stub/PrincipalAccessBoundaryPoliciesStubSettings.java @@ -0,0 +1,951 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PrincipalAccessBoundaryPoliciesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesStubSettings.Builder
+ *     principalAccessBoundaryPoliciesSettingsBuilder =
+ *         PrincipalAccessBoundaryPoliciesStubSettings.newBuilder();
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .getPrincipalAccessBoundaryPolicySettings()
+ *     .setRetrySettings(
+ *         principalAccessBoundaryPoliciesSettingsBuilder
+ *             .getPrincipalAccessBoundaryPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PrincipalAccessBoundaryPoliciesStubSettings principalAccessBoundaryPoliciesSettings =
+ *     principalAccessBoundaryPoliciesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesStubSettings.Builder
+ *     principalAccessBoundaryPoliciesSettingsBuilder =
+ *         PrincipalAccessBoundaryPoliciesStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PrincipalAccessBoundaryPoliciesStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings; + private final UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings; + private final PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings; + private final PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings; + + private static final PagedListDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPrincipalAccessBoundaryPoliciesRequest injectToken( + ListPrincipalAccessBoundaryPoliciesRequest payload, String token) { + return ListPrincipalAccessBoundaryPoliciesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListPrincipalAccessBoundaryPoliciesRequest injectPageSize( + ListPrincipalAccessBoundaryPoliciesRequest payload, int pageSize) { + return ListPrincipalAccessBoundaryPoliciesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListPrincipalAccessBoundaryPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPrincipalAccessBoundaryPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPrincipalAccessBoundaryPoliciesResponse payload) { + return payload.getPrincipalAccessBoundaryPoliciesList(); + } + }; + + private static final PagedListDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest injectToken( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload, String token) { + return SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest injectPageSize( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload, int pageSize) { + return SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken( + SearchPrincipalAccessBoundaryPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchPrincipalAccessBoundaryPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListResponseFactory< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse> + callable, + ListPrincipalAccessBoundaryPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + pageContext = + PageContext.create( + callable, + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_DESC, + request, + context); + return ListPrincipalAccessBoundaryPoliciesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + callable, + SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + pageContext = + PageContext.create( + callable, + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_DESC, + request, + context); + return SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings() { + return createPrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return createPrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + getPrincipalAccessBoundaryPolicySettings() { + return getPrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings() { + return updatePrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return updatePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings() { + return deletePrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return deletePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to listPrincipalAccessBoundaryPolicies. */ + public PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return listPrincipalAccessBoundaryPoliciesSettings; + } + + /** + * Returns the object with the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return searchPrincipalAccessBoundaryPolicyBindingsSettings; + } + + public PrincipalAccessBoundaryPoliciesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPrincipalAccessBoundaryPoliciesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPrincipalAccessBoundaryPoliciesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PrincipalAccessBoundaryPoliciesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PrincipalAccessBoundaryPoliciesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PrincipalAccessBoundaryPoliciesStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + createPrincipalAccessBoundaryPolicySettings = + settingsBuilder.createPrincipalAccessBoundaryPolicySettings().build(); + createPrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.createPrincipalAccessBoundaryPolicyOperationSettings().build(); + getPrincipalAccessBoundaryPolicySettings = + settingsBuilder.getPrincipalAccessBoundaryPolicySettings().build(); + updatePrincipalAccessBoundaryPolicySettings = + settingsBuilder.updatePrincipalAccessBoundaryPolicySettings().build(); + updatePrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.updatePrincipalAccessBoundaryPolicyOperationSettings().build(); + deletePrincipalAccessBoundaryPolicySettings = + settingsBuilder.deletePrincipalAccessBoundaryPolicySettings().build(); + deletePrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.deletePrincipalAccessBoundaryPolicyOperationSettings().build(); + listPrincipalAccessBoundaryPoliciesSettings = + settingsBuilder.listPrincipalAccessBoundaryPoliciesSettings().build(); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + settingsBuilder.searchPrincipalAccessBoundaryPolicyBindingsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PrincipalAccessBoundaryPoliciesStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings; + private final UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings; + private final PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings; + private final PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + getPrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + deletePrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + listPrincipalAccessBoundaryPoliciesSettings = + PagedCallSettings.newBuilder(LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_FACT); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + PagedCallSettings.newBuilder( + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPrincipalAccessBoundaryPolicySettings, + getPrincipalAccessBoundaryPolicySettings, + updatePrincipalAccessBoundaryPolicySettings, + deletePrincipalAccessBoundaryPolicySettings, + listPrincipalAccessBoundaryPoliciesSettings, + searchPrincipalAccessBoundaryPolicyBindingsSettings); + initDefaults(this); + } + + protected Builder(PrincipalAccessBoundaryPoliciesStubSettings settings) { + super(settings); + + createPrincipalAccessBoundaryPolicySettings = + settings.createPrincipalAccessBoundaryPolicySettings.toBuilder(); + createPrincipalAccessBoundaryPolicyOperationSettings = + settings.createPrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + getPrincipalAccessBoundaryPolicySettings = + settings.getPrincipalAccessBoundaryPolicySettings.toBuilder(); + updatePrincipalAccessBoundaryPolicySettings = + settings.updatePrincipalAccessBoundaryPolicySettings.toBuilder(); + updatePrincipalAccessBoundaryPolicyOperationSettings = + settings.updatePrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + deletePrincipalAccessBoundaryPolicySettings = + settings.deletePrincipalAccessBoundaryPolicySettings.toBuilder(); + deletePrincipalAccessBoundaryPolicyOperationSettings = + settings.deletePrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + listPrincipalAccessBoundaryPoliciesSettings = + settings.listPrincipalAccessBoundaryPoliciesSettings.toBuilder(); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPrincipalAccessBoundaryPolicySettings, + getPrincipalAccessBoundaryPolicySettings, + updatePrincipalAccessBoundaryPolicySettings, + deletePrincipalAccessBoundaryPolicySettings, + listPrincipalAccessBoundaryPoliciesSettings, + searchPrincipalAccessBoundaryPolicyBindingsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getPrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPrincipalAccessBoundaryPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchPrincipalAccessBoundaryPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + PrincipalAccessBoundaryPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + PrincipalAccessBoundaryPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings() { + return createPrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return createPrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings() { + return getPrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings() { + return updatePrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return updatePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings() { + return deletePrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return deletePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to listPrincipalAccessBoundaryPolicies. + */ + public PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return listPrincipalAccessBoundaryPoliciesSettings; + } + + /** + * Returns the builder for the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return searchPrincipalAccessBoundaryPolicyBindingsSettings; + } + + @Override + public PrincipalAccessBoundaryPoliciesStubSettings build() throws IOException { + return new PrincipalAccessBoundaryPoliciesStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsClient.java new file mode 100644 index 000000000000..85e4bc27e975 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsClient.java @@ -0,0 +1,1906 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v3beta.stub.PolicyBindingsStub; +import com.google.iam.v3beta.stub.PolicyBindingsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: An interface for managing Identity and Access Management (IAM) policy + * bindings. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+ *   PolicyBindingName name =
+ *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+ *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+ *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PolicyBindingsClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePolicyBinding

Creates a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. Once the binding is created, the policy is applied to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPolicyBindingAsync(CreatePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPolicyBindingAsync(FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(LocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId) + *

  • createPolicyBindingAsync(String parent, PolicyBinding policyBinding, String policyBindingId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPolicyBindingOperationCallable() + *

  • createPolicyBindingCallable() + *

+ *

GetPolicyBinding

Gets a policy binding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPolicyBinding(GetPolicyBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPolicyBinding(PolicyBindingName name) + *

  • getPolicyBinding(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPolicyBindingCallable() + *

+ *

UpdatePolicyBinding

Updates a policy binding and returns a long-running operation. Callers will need the IAM permissions on the policy and target in the binding to update, and the IAM permission to remove the existing policy from the binding. Target is immutable and cannot be updated. Once the binding is updated, the new policy is applied to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePolicyBindingAsync(UpdatePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updatePolicyBindingAsync(PolicyBinding policyBinding, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePolicyBindingOperationCallable() + *

  • updatePolicyBindingCallable() + *

+ *

DeletePolicyBinding

Deletes a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. Once the binding is deleted, the policy no longer applies to the target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePolicyBindingAsync(DeletePolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePolicyBindingAsync(PolicyBindingName name) + *

  • deletePolicyBindingAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePolicyBindingOperationCallable() + *

  • deletePolicyBindingCallable() + *

+ *

ListPolicyBindings

Lists policy bindings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPolicyBindings(ListPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPolicyBindings(FolderLocationName parent) + *

  • listPolicyBindings(LocationName parent) + *

  • listPolicyBindings(OrganizationLocationName parent) + *

  • listPolicyBindings(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPolicyBindingsPagedCallable() + *

  • listPolicyBindingsCallable() + *

+ *

SearchTargetPolicyBindings

Search policy bindings by target. Returns all policy binding objects bound directly to target.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchTargetPolicyBindings(SearchTargetPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • searchTargetPolicyBindings(FolderLocationName parent, String target) + *

  • searchTargetPolicyBindings(LocationName parent, String target) + *

  • searchTargetPolicyBindings(OrganizationLocationName parent, String target) + *

  • searchTargetPolicyBindings(String parent, String target) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchTargetPolicyBindingsPagedCallable() + *

  • searchTargetPolicyBindingsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PolicyBindingsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings policyBindingsSettings =
+ *     PolicyBindingsSettings.newHttpJsonBuilder().build();
+ * PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class PolicyBindingsClient implements BackgroundResource { + private final PolicyBindingsSettings settings; + private final PolicyBindingsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PolicyBindingsClient with default settings. */ + public static final PolicyBindingsClient create() throws IOException { + return create(PolicyBindingsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PolicyBindingsClient create(PolicyBindingsSettings settings) + throws IOException { + return new PolicyBindingsClient(settings); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(PolicyBindingsSettings). + */ + public static final PolicyBindingsClient create(PolicyBindingsStub stub) { + return new PolicyBindingsClient(stub); + } + + /** + * Constructs an instance of PolicyBindingsClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PolicyBindingsClient(PolicyBindingsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PolicyBindingsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PolicyBindingsClient(PolicyBindingsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PolicyBindingsSettings getSettings() { + return settings; + } + + public PolicyBindingsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + LocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   String policyBindingId = "policyBindingId1375821166";
+   *   PolicyBinding response =
+   *       policyBindingsClient
+   *           .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy binding will be created. The + * binding parent is the closest Resource Manager resource (project, folder or organization) + * to the binding target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param policyBinding Required. The policy binding to create. + * @param policyBindingId Required. The ID to use for the policy binding, which will become the + * final component of the policy binding's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + String parent, PolicyBinding policyBinding, String policyBindingId) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(parent) + .setPolicyBinding(policyBinding) + .setPolicyBindingId(policyBindingId) + .build(); + return createPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.createPolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBindingAsync( + CreatePolicyBindingRequest request) { + return createPolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.createPolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPolicyBindingOperationCallable() { + return stub.createPolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is created, the policy is applied + * to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   CreatePolicyBindingRequest request =
+   *       CreatePolicyBindingRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPolicyBindingId("policyBindingId1375821166")
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.createPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPolicyBindingCallable() { + return stub.createPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBindingName name =
+   *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to retrieve. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(PolicyBindingName name) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String name =
+   *       PolicyBindingName.ofOrganizationLocationPolicyBindingName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
+   *           .toString();
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to retrieve. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(String name) { + GetPolicyBindingRequest request = GetPolicyBindingRequest.newBuilder().setName(name).build(); + return getPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   GetPolicyBindingRequest request =
+   *       GetPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.getPolicyBinding(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyBinding getPolicyBinding(GetPolicyBindingRequest request) { + return getPolicyBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   GetPolicyBindingRequest request =
+   *       GetPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.getPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPolicyBindingCallable() { + return stub.getPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PolicyBinding response =
+   *       policyBindingsClient.updatePolicyBindingAsync(policyBinding, updateMask).get();
+   * }
+   * }
+ * + * @param policyBinding Required. The policy binding to update. + *

The policy binding's `name` field is used to identify the policy binding to update. + * @param updateMask Optional. The list of fields to update + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyBindingAsync( + PolicyBinding policyBinding, FieldMask updateMask) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(policyBinding) + .setUpdateMask(updateMask) + .build(); + return updatePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   PolicyBinding response = policyBindingsClient.updatePolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePolicyBindingAsync( + UpdatePolicyBindingRequest request) { + return updatePolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.updatePolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updatePolicyBindingOperationCallable() { + return stub.updatePolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on the policy and target in the binding to update, and the IAM permission to remove + * the existing policy from the binding. Target is immutable and cannot be updated. Once the + * binding is updated, the new policy is applied to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   UpdatePolicyBindingRequest request =
+   *       UpdatePolicyBindingRequest.newBuilder()
+   *           .setPolicyBinding(PolicyBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.updatePolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePolicyBindingCallable() { + return stub.updatePolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   PolicyBindingName name =
+   *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+   *   policyBindingsClient.deletePolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to delete. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync( + PolicyBindingName name) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String name =
+   *       PolicyBindingName.ofOrganizationLocationPolicyBindingName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
+   *           .toString();
+   *   policyBindingsClient.deletePolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy binding to delete. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
  • `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync(String name) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder().setName(name).build(); + return deletePolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   policyBindingsClient.deletePolicyBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePolicyBindingAsync( + DeletePolicyBindingRequest request) { + return deletePolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       policyBindingsClient.deletePolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePolicyBindingOperationCallable() { + return stub.deletePolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy binding and returns a long-running operation. Callers will need the IAM + * permissions on both the policy and target. Once the binding is deleted, the policy no longer + * applies to the target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   DeletePolicyBindingRequest request =
+   *       DeletePolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               PolicyBindingName.ofProjectLocationPolicyBindingName(
+   *                       "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.deletePolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePolicyBindingCallable() { + return stub.deletePolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(FolderLocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(LocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(OrganizationLocationName parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of policy bindings. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings(String parent) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder().setParent(parent).build(); + return listPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (PolicyBinding element : policyBindingsClient.listPolicyBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBindingsPagedResponse listPolicyBindings( + ListPolicyBindingsRequest request) { + return listPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.listPolicyBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBindingsPagedCallable() { + return stub.listPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   ListPolicyBindingsRequest request =
+   *       ListPolicyBindingsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListPolicyBindingsResponse response =
+   *         policyBindingsClient.listPolicyBindingsCallable().call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBindingsCallable() { + return stub.listPolicyBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + FolderLocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + LocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + OrganizationLocationName parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   String target = "target-880905839";
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search will be performed. This should be + * the nearest Resource Manager resource (project, folder, or organization) to the target. + *

Format: + *

    + *
  • `projects/{project_id}/locations/{location}` + *
  • `projects/{project_number}/locations/{location}` + *
  • `folders/{folder_id}/locations/{location}` + *
  • `organizations/{organization_id}/locations/{location}` + *
+ * + * @param target Required. The target resource, which is bound to the policy in the binding. + *

Format: + *

    + *
  • `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + *
  • `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + *
  • `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + *
  • `//cloudresourcemanager.googleapis.com/projects/{project_number}` + *
  • `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + *
  • `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + String parent, String target) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder().setParent(parent).setTarget(target).build(); + return searchTargetPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   for (PolicyBinding element :
+   *       policyBindingsClient.searchTargetPolicyBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings( + SearchTargetPolicyBindingsRequest request) { + return searchTargetPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBindingsClient.searchTargetPolicyBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable() { + return stub.searchTargetPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search policy bindings by target. Returns all policy binding objects bound directly to target. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+   *   SearchTargetPolicyBindingsRequest request =
+   *       SearchTargetPolicyBindingsRequest.newBuilder()
+   *           .setTarget("target-880905839")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .build();
+   *   while (true) {
+   *     SearchTargetPolicyBindingsResponse response =
+   *         policyBindingsClient.searchTargetPolicyBindingsCallable().call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchTargetPolicyBindingsCallable() { + return stub.searchTargetPolicyBindingsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage, + ListPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPolicyBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPolicyBindingsPagedResponse(ListPolicyBindingsPage page) { + super(page, ListPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPolicyBindingsPage + extends AbstractPage< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage> { + + private ListPolicyBindingsPage( + PageContext context, + ListPolicyBindingsResponse response) { + super(context, response); + } + + private static ListPolicyBindingsPage createEmptyPage() { + return new ListPolicyBindingsPage(null, null); + } + + @Override + protected ListPolicyBindingsPage createPage( + PageContext context, + ListPolicyBindingsResponse response) { + return new ListPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + PolicyBinding, + ListPolicyBindingsPage, + ListPolicyBindingsFixedSizeCollection> { + + private ListPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPolicyBindingsFixedSizeCollection createEmptyCollection() { + return new ListPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPolicyBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchTargetPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage, + SearchTargetPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchTargetPolicyBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchTargetPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchTargetPolicyBindingsPagedResponse(SearchTargetPolicyBindingsPage page) { + super(page, SearchTargetPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchTargetPolicyBindingsPage + extends AbstractPage< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage> { + + private SearchTargetPolicyBindingsPage( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + SearchTargetPolicyBindingsResponse response) { + super(context, response); + } + + private static SearchTargetPolicyBindingsPage createEmptyPage() { + return new SearchTargetPolicyBindingsPage(null, null); + } + + @Override + protected SearchTargetPolicyBindingsPage createPage( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + SearchTargetPolicyBindingsResponse response) { + return new SearchTargetPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchTargetPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding, + SearchTargetPolicyBindingsPage, + SearchTargetPolicyBindingsFixedSizeCollection> { + + private SearchTargetPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchTargetPolicyBindingsFixedSizeCollection createEmptyCollection() { + return new SearchTargetPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected SearchTargetPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchTargetPolicyBindingsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsSettings.java new file mode 100644 index 000000000000..e6a1e7078a32 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PolicyBindingsSettings.java @@ -0,0 +1,353 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v3beta.stub.PolicyBindingsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyBindingsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsSettings.newBuilder();
+ * policyBindingsSettingsBuilder
+ *     .getPolicyBindingSettings()
+ *     .setRetrySettings(
+ *         policyBindingsSettingsBuilder
+ *             .getPolicyBindingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBindingsSettings policyBindingsSettings = policyBindingsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBindingsSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PolicyBindingsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings createPolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).createPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public OperationCallSettings + createPolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).createPolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings getPolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).getPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings updatePolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).updatePolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings + updatePolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).updatePolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings deletePolicyBindingSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).deletePolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings + deletePolicyBindingOperationSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).deletePolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to listPolicyBindings. */ + public PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).listPolicyBindingsSettings(); + } + + /** Returns the object with the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return ((PolicyBindingsStubSettings) getStubSettings()).searchTargetPolicyBindingsSettings(); + } + + public static final PolicyBindingsSettings create(PolicyBindingsStubSettings stub) + throws IOException { + return new PolicyBindingsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PolicyBindingsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PolicyBindingsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PolicyBindingsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PolicyBindingsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PolicyBindingsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PolicyBindingsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PolicyBindingsStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyBindingsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyBindingsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PolicyBindingsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PolicyBindingsStubSettings.newBuilder(clientContext)); + } + + protected Builder(PolicyBindingsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PolicyBindingsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PolicyBindingsStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PolicyBindingsStubSettings.newHttpJsonBuilder()); + } + + public PolicyBindingsStubSettings.Builder getStubSettingsBuilder() { + return ((PolicyBindingsStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings.Builder + createPolicyBindingSettings() { + return getStubSettingsBuilder().createPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings() { + return getStubSettingsBuilder().createPolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings.Builder + getPolicyBindingSettings() { + return getStubSettingsBuilder().getPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings.Builder + updatePolicyBindingSettings() { + return getStubSettingsBuilder().updatePolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings() { + return getStubSettingsBuilder().updatePolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings.Builder + deletePolicyBindingSettings() { + return getStubSettingsBuilder().deletePolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings.Builder + deletePolicyBindingOperationSettings() { + return getStubSettingsBuilder().deletePolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listPolicyBindings. */ + public PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return getStubSettingsBuilder().listPolicyBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return getStubSettingsBuilder().searchTargetPolicyBindingsSettings(); + } + + @Override + public PolicyBindingsSettings build() throws IOException { + return new PolicyBindingsSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClient.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClient.java new file mode 100644 index 000000000000..c4d396cd789e --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClient.java @@ -0,0 +1,1648 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v3beta.stub.PrincipalAccessBoundaryPoliciesStub; +import com.google.iam.v3beta.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages Identity and Access Management (IAM) principal access boundary + * policies. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create()) {
+ *   PrincipalAccessBoundaryPolicyName name =
+ *       PrincipalAccessBoundaryPolicyName.of(
+ *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+ *   PrincipalAccessBoundaryPolicy response =
+ *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PrincipalAccessBoundaryPoliciesClient object to clean + * up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePrincipalAccessBoundaryPolicy

Creates a principal access boundary policy, and returns a long running operation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyAsync(CreatePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyAsync(OrganizationLocationName parent, PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, String principalAccessBoundaryPolicyId) + *

  • createPrincipalAccessBoundaryPolicyAsync(String parent, PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, String principalAccessBoundaryPolicyId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPrincipalAccessBoundaryPolicyOperationCallable() + *

  • createPrincipalAccessBoundaryPolicyCallable() + *

+ *

GetPrincipalAccessBoundaryPolicy

Gets a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPrincipalAccessBoundaryPolicy(GetPrincipalAccessBoundaryPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicyName name) + *

  • getPrincipalAccessBoundaryPolicy(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPrincipalAccessBoundaryPolicyCallable() + *

+ *

UpdatePrincipalAccessBoundaryPolicy

Updates a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyAsync(UpdatePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyAsync(PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePrincipalAccessBoundaryPolicyOperationCallable() + *

  • updatePrincipalAccessBoundaryPolicyCallable() + *

+ *

DeletePrincipalAccessBoundaryPolicy

Deletes a principal access boundary policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyAsync(DeletePrincipalAccessBoundaryPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyAsync(PrincipalAccessBoundaryPolicyName name) + *

  • deletePrincipalAccessBoundaryPolicyAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePrincipalAccessBoundaryPolicyOperationCallable() + *

  • deletePrincipalAccessBoundaryPolicyCallable() + *

+ *

ListPrincipalAccessBoundaryPolicies

Lists principal access boundary policies.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPrincipalAccessBoundaryPolicies(ListPrincipalAccessBoundaryPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPrincipalAccessBoundaryPolicies(OrganizationLocationName parent) + *

  • listPrincipalAccessBoundaryPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPrincipalAccessBoundaryPoliciesPagedCallable() + *

  • listPrincipalAccessBoundaryPoliciesCallable() + *

+ *

SearchPrincipalAccessBoundaryPolicyBindings

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindings(SearchPrincipalAccessBoundaryPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindings(PrincipalAccessBoundaryPolicyName name) + *

  • searchPrincipalAccessBoundaryPolicyBindings(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() + *

  • searchPrincipalAccessBoundaryPolicyBindingsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * PrincipalAccessBoundaryPoliciesSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder().build();
+ * PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClient implements BackgroundResource { + private final PrincipalAccessBoundaryPoliciesSettings settings; + private final PrincipalAccessBoundaryPoliciesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PrincipalAccessBoundaryPoliciesClient with default settings. */ + public static final PrincipalAccessBoundaryPoliciesClient create() throws IOException { + return create(PrincipalAccessBoundaryPoliciesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final PrincipalAccessBoundaryPoliciesClient create( + PrincipalAccessBoundaryPoliciesSettings settings) throws IOException { + return new PrincipalAccessBoundaryPoliciesClient(settings); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(PrincipalAccessBoundaryPoliciesSettings). + */ + public static final PrincipalAccessBoundaryPoliciesClient create( + PrincipalAccessBoundaryPoliciesStub stub) { + return new PrincipalAccessBoundaryPoliciesClient(stub); + } + + /** + * Constructs an instance of PrincipalAccessBoundaryPoliciesClient, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected PrincipalAccessBoundaryPoliciesClient(PrincipalAccessBoundaryPoliciesSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((PrincipalAccessBoundaryPoliciesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PrincipalAccessBoundaryPoliciesClient(PrincipalAccessBoundaryPoliciesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final PrincipalAccessBoundaryPoliciesSettings getSettings() { + return settings; + } + + public PrincipalAccessBoundaryPoliciesStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175";
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(
+   *               parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this principal access boundary policy will be + * created. Only organizations are supported. + *

Format: `organizations/{organization_id}/locations/{location}` + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to create. + * @param principalAccessBoundaryPolicyId Required. The ID to use for the principal access + * boundary policy, which will become the final component of the principal access boundary + * policy's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync( + OrganizationLocationName parent, + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, + String principalAccessBoundaryPolicyId) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setPrincipalAccessBoundaryPolicyId(principalAccessBoundaryPolicyId) + .build(); + return createPrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175";
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(
+   *               parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this principal access boundary policy will be + * created. Only organizations are supported. + *

Format: `organizations/{organization_id}/locations/{location}` + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to create. + * @param principalAccessBoundaryPolicyId Required. The ID to use for the principal access + * boundary policy, which will become the final component of the principal access boundary + * policy's resource name. + *

This value must start with a lowercase letter followed by up to 62 lowercase letters, + * numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-\\.]{2,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync( + String parent, + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, + String principalAccessBoundaryPolicyId) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(parent) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setPrincipalAccessBoundaryPolicyId(principalAccessBoundaryPolicyId) + .build(); + return createPrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyAsync(request)
+   *           .get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPrincipalAccessBoundaryPolicyAsync(CreatePrincipalAccessBoundaryPolicyRequest request) { + return createPrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return stub.createPrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a principal access boundary policy, and returns a long running operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   CreatePrincipalAccessBoundaryPolicyRequest request =
+   *       CreatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175")
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .createPrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return stub.createPrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to retrieve. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + PrincipalAccessBoundaryPolicyName name) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPrincipalAccessBoundaryPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to retrieve. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(String name) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder().setName(name).build(); + return getPrincipalAccessBoundaryPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   GetPrincipalAccessBoundaryPolicyRequest request =
+   *       GetPrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + GetPrincipalAccessBoundaryPolicyRequest request) { + return getPrincipalAccessBoundaryPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   GetPrincipalAccessBoundaryPolicyRequest request =
+   *       GetPrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .getPrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return stub.getPrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy =
+   *       PrincipalAccessBoundaryPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param principalAccessBoundaryPolicy Required. The principal access boundary policy to update. + *

The principal access boundary policy's `name` field is used to identify the policy to + * update. + * @param updateMask Optional. The list of fields to update + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePrincipalAccessBoundaryPolicyAsync( + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy, FieldMask updateMask) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .setUpdateMask(updateMask) + .build(); + return updatePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   PrincipalAccessBoundaryPolicy response =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyAsync(request)
+   *           .get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePrincipalAccessBoundaryPolicyAsync(UpdatePrincipalAccessBoundaryPolicyRequest request) { + return updatePrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PrincipalAccessBoundaryPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return stub.updatePrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   UpdatePrincipalAccessBoundaryPolicyRequest request =
+   *       UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .updatePrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return stub.updatePrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to delete. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + PrincipalAccessBoundaryPolicyName name) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy to delete. + *

Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + String name) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder().setName(name).build(); + return deletePrincipalAccessBoundaryPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePrincipalAccessBoundaryPolicyAsync( + DeletePrincipalAccessBoundaryPolicyRequest request) { + return deletePrincipalAccessBoundaryPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .deletePrincipalAccessBoundaryPolicyOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return stub.deletePrincipalAccessBoundaryPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a principal access boundary policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   DeletePrincipalAccessBoundaryPolicyRequest request =
+   *       DeletePrincipalAccessBoundaryPolicyRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .deletePrincipalAccessBoundaryPolicyCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return stub.deletePrincipalAccessBoundaryPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of principal access + * boundary policies. + *

Format: `organizations/{organization_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + OrganizationLocationName parent) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPrincipalAccessBoundaryPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource, which owns the collection of principal access + * boundary policies. + *

Format: `organizations/{organization_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + String parent) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder().setParent(parent).build(); + return listPrincipalAccessBoundaryPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PrincipalAccessBoundaryPolicy element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPolicies(request)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrincipalAccessBoundaryPoliciesPagedResponse listPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest request) { + return listPrincipalAccessBoundaryPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .listPrincipalAccessBoundaryPoliciesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (PrincipalAccessBoundaryPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return stub.listPrincipalAccessBoundaryPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists principal access boundary policies. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   ListPrincipalAccessBoundaryPoliciesRequest request =
+   *       ListPrincipalAccessBoundaryPoliciesRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPrincipalAccessBoundaryPoliciesResponse response =
+   *         principalAccessBoundaryPoliciesClient
+   *             .listPrincipalAccessBoundaryPoliciesCallable()
+   *             .call(request);
+   *     for (PrincipalAccessBoundaryPolicy element :
+   *         response.getPrincipalAccessBoundaryPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return stub.listPrincipalAccessBoundaryPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   PrincipalAccessBoundaryPolicyName name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(name)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy. Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings(PrincipalAccessBoundaryPolicyName name) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return searchPrincipalAccessBoundaryPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   String name =
+   *       PrincipalAccessBoundaryPolicyName.of(
+   *               "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *           .toString();
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(name)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the principal access boundary policy. Format: + * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings(String name) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder().setName(name).build(); + return searchPrincipalAccessBoundaryPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PolicyBinding element :
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindings(request)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + searchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       principalAccessBoundaryPoliciesClient
+   *           .searchPrincipalAccessBoundaryPolicyBindingsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (PolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return stub.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings + * permission on that policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+   *     PrincipalAccessBoundaryPoliciesClient.create()) {
+   *   SearchPrincipalAccessBoundaryPolicyBindingsRequest request =
+   *       SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder()
+   *           .setName(
+   *               PrincipalAccessBoundaryPolicyName.of(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchPrincipalAccessBoundaryPolicyBindingsResponse response =
+   *         principalAccessBoundaryPoliciesClient
+   *             .searchPrincipalAccessBoundaryPolicyBindingsCallable()
+   *             .call(request);
+   *     for (PolicyBinding element : response.getPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return stub.searchPrincipalAccessBoundaryPolicyBindingsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPrincipalAccessBoundaryPoliciesPagedResponse + extends AbstractPagedListResponse< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage, + ListPrincipalAccessBoundaryPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPrincipalAccessBoundaryPoliciesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPrincipalAccessBoundaryPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPrincipalAccessBoundaryPoliciesPagedResponse( + ListPrincipalAccessBoundaryPoliciesPage page) { + super(page, ListPrincipalAccessBoundaryPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPrincipalAccessBoundaryPoliciesPage + extends AbstractPage< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage> { + + private ListPrincipalAccessBoundaryPoliciesPage( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ListPrincipalAccessBoundaryPoliciesResponse response) { + super(context, response); + } + + private static ListPrincipalAccessBoundaryPoliciesPage createEmptyPage() { + return new ListPrincipalAccessBoundaryPoliciesPage(null, null); + } + + @Override + protected ListPrincipalAccessBoundaryPoliciesPage createPage( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ListPrincipalAccessBoundaryPoliciesResponse response) { + return new ListPrincipalAccessBoundaryPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPrincipalAccessBoundaryPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy, + ListPrincipalAccessBoundaryPoliciesPage, + ListPrincipalAccessBoundaryPoliciesFixedSizeCollection> { + + private ListPrincipalAccessBoundaryPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPrincipalAccessBoundaryPoliciesFixedSizeCollection createEmptyCollection() { + return new ListPrincipalAccessBoundaryPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListPrincipalAccessBoundaryPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPrincipalAccessBoundaryPoliciesFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchPrincipalAccessBoundaryPolicyBindingsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse( + SearchPrincipalAccessBoundaryPolicyBindingsPage page) { + super( + page, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsPage + extends AbstractPage< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage> { + + private SearchPrincipalAccessBoundaryPolicyBindingsPage( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + SearchPrincipalAccessBoundaryPolicyBindingsResponse response) { + super(context, response); + } + + private static SearchPrincipalAccessBoundaryPolicyBindingsPage createEmptyPage() { + return new SearchPrincipalAccessBoundaryPolicyBindingsPage(null, null); + } + + @Override + protected SearchPrincipalAccessBoundaryPolicyBindingsPage createPage( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + SearchPrincipalAccessBoundaryPolicyBindingsResponse response) { + return new SearchPrincipalAccessBoundaryPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding, + SearchPrincipalAccessBoundaryPolicyBindingsPage, + SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection> { + + private SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection + createEmptyCollection() { + return new SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchPrincipalAccessBoundaryPolicyBindingsFixedSizeCollection( + pages, collectionSize); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesSettings.java new file mode 100644 index 000000000000..c02c51a815c9 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesSettings.java @@ -0,0 +1,405 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.iam.v3beta.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PrincipalAccessBoundaryPoliciesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder();
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .getPrincipalAccessBoundaryPolicySettings()
+ *     .setRetrySettings(
+ *         principalAccessBoundaryPoliciesSettingsBuilder
+ *             .getPrincipalAccessBoundaryPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings =
+ *     principalAccessBoundaryPoliciesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder =
+ *     PrincipalAccessBoundaryPoliciesSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .createPrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .createPrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + getPrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .getPrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .updatePrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .updatePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .deletePrincipalAccessBoundaryPolicySettings(); + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .deletePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to listPrincipalAccessBoundaryPolicies. */ + public PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .listPrincipalAccessBoundaryPoliciesSettings(); + } + + /** + * Returns the object with the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return ((PrincipalAccessBoundaryPoliciesStubSettings) getStubSettings()) + .searchPrincipalAccessBoundaryPolicyBindingsSettings(); + } + + public static final PrincipalAccessBoundaryPoliciesSettings create( + PrincipalAccessBoundaryPoliciesStubSettings stub) throws IOException { + return new PrincipalAccessBoundaryPoliciesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PrincipalAccessBoundaryPoliciesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PrincipalAccessBoundaryPoliciesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PrincipalAccessBoundaryPoliciesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PrincipalAccessBoundaryPoliciesSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(clientContext)); + } + + protected Builder(PrincipalAccessBoundaryPoliciesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PrincipalAccessBoundaryPoliciesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PrincipalAccessBoundaryPoliciesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder()); + } + + public PrincipalAccessBoundaryPoliciesStubSettings.Builder getStubSettingsBuilder() { + return ((PrincipalAccessBoundaryPoliciesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().createPrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().createPrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().getPrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().updatePrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().updatePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings() { + return getStubSettingsBuilder().deletePrincipalAccessBoundaryPolicySettings(); + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return getStubSettingsBuilder().deletePrincipalAccessBoundaryPolicyOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to listPrincipalAccessBoundaryPolicies. + */ + public PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return getStubSettingsBuilder().listPrincipalAccessBoundaryPoliciesSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return getStubSettingsBuilder().searchPrincipalAccessBoundaryPolicyBindingsSettings(); + } + + @Override + public PrincipalAccessBoundaryPoliciesSettings build() throws IOException { + return new PrincipalAccessBoundaryPoliciesSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/gapic_metadata.json b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/gapic_metadata.json new file mode 100644 index 000000000000..bd439bde035d --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.iam.v3beta", + "libraryPackage": "com.google.iam.v3beta", + "services": { + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "PolicyBindingsClient", + "rpcs": { + "CreatePolicyBinding": { + "methods": ["createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingAsync", "createPolicyBindingOperationCallable", "createPolicyBindingCallable"] + }, + "DeletePolicyBinding": { + "methods": ["deletePolicyBindingAsync", "deletePolicyBindingAsync", "deletePolicyBindingAsync", "deletePolicyBindingOperationCallable", "deletePolicyBindingCallable"] + }, + "GetPolicyBinding": { + "methods": ["getPolicyBinding", "getPolicyBinding", "getPolicyBinding", "getPolicyBindingCallable"] + }, + "ListPolicyBindings": { + "methods": ["listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindings", "listPolicyBindingsPagedCallable", "listPolicyBindingsCallable"] + }, + "SearchTargetPolicyBindings": { + "methods": ["searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindings", "searchTargetPolicyBindingsPagedCallable", "searchTargetPolicyBindingsCallable"] + }, + "UpdatePolicyBinding": { + "methods": ["updatePolicyBindingAsync", "updatePolicyBindingAsync", "updatePolicyBindingOperationCallable", "updatePolicyBindingCallable"] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "PrincipalAccessBoundaryPoliciesClient", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": ["createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyAsync", "createPrincipalAccessBoundaryPolicyOperationCallable", "createPrincipalAccessBoundaryPolicyCallable"] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": ["deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyAsync", "deletePrincipalAccessBoundaryPolicyOperationCallable", "deletePrincipalAccessBoundaryPolicyCallable"] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": ["getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicy", "getPrincipalAccessBoundaryPolicyCallable"] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": ["listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPolicies", "listPrincipalAccessBoundaryPoliciesPagedCallable", "listPrincipalAccessBoundaryPoliciesCallable"] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": ["searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindings", "searchPrincipalAccessBoundaryPolicyBindingsPagedCallable", "searchPrincipalAccessBoundaryPolicyBindingsCallable"] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": ["updatePrincipalAccessBoundaryPolicyAsync", "updatePrincipalAccessBoundaryPolicyAsync", "updatePrincipalAccessBoundaryPolicyOperationCallable", "updatePrincipalAccessBoundaryPolicyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/package-info.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/package-info.java new file mode 100644 index 000000000000..330c1b20a6b4 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/package-info.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +/** + * A client to Identity and Access Management (IAM) API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= PolicyBindingsClient ======================= + * + *

Service Description: An interface for managing Identity and Access Management (IAM) policy + * bindings. + * + *

Sample for PolicyBindingsClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
+ *   PolicyBindingName name =
+ *       PolicyBindingName.ofProjectLocationPolicyBindingName(
+ *           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
+ *   PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
+ * }
+ * }
+ * + *

======================= PrincipalAccessBoundaryPoliciesClient ======================= + * + *

Service Description: Manages Identity and Access Management (IAM) principal access boundary + * policies. + * + *

Sample for PrincipalAccessBoundaryPoliciesClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient =
+ *     PrincipalAccessBoundaryPoliciesClient.create()) {
+ *   PrincipalAccessBoundaryPolicyName name =
+ *       PrincipalAccessBoundaryPolicyName.of(
+ *           "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]");
+ *   PrincipalAccessBoundaryPolicy response =
+ *       principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.iam.v3beta; + +import javax.annotation.Generated; diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsCallableFactory.java new file mode 100644 index 000000000000..4fac37756265 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PolicyBindings service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPolicyBindingsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsStub.java new file mode 100644 index 000000000000..67e9842d2dc2 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPolicyBindingsStub.java @@ -0,0 +1,425 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.ListPolicyBindingsResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3beta.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPolicyBindingsStub extends PolicyBindingsStub { + private static final MethodDescriptor + createPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/CreatePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/GetPolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/UpdatePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/DeletePolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listPolicyBindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/ListPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindingsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v3beta.PolicyBindings/SearchTargetPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchTargetPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchTargetPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createPolicyBindingCallable; + private final OperationCallable + createPolicyBindingOperationCallable; + private final UnaryCallable getPolicyBindingCallable; + private final UnaryCallable updatePolicyBindingCallable; + private final OperationCallable + updatePolicyBindingOperationCallable; + private final UnaryCallable deletePolicyBindingCallable; + private final OperationCallable + deletePolicyBindingOperationCallable; + private final UnaryCallable + listPolicyBindingsCallable; + private final UnaryCallable + listPolicyBindingsPagedCallable; + private final UnaryCallable + searchTargetPolicyBindingsCallable; + private final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPolicyBindingsStub create(PolicyBindingsStubSettings settings) + throws IOException { + return new GrpcPolicyBindingsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPolicyBindingsStub create(ClientContext clientContext) + throws IOException { + return new GrpcPolicyBindingsStub( + PolicyBindingsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPolicyBindingsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPolicyBindingsStub( + PolicyBindingsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPolicyBindingsStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyBindingsStub(PolicyBindingsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPolicyBindingsCallableFactory()); + } + + /** + * Constructs an instance of GrpcPolicyBindingsStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyBindingsStub( + PolicyBindingsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createPolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getPolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updatePolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "policy_binding.name", String.valueOf(request.getPolicyBinding().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listPolicyBindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + searchTargetPolicyBindingsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(searchTargetPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createPolicyBindingCallable = + callableFactory.createUnaryCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingSettings(), + clientContext); + this.createPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.getPolicyBindingCallable = + callableFactory.createUnaryCallable( + getPolicyBindingTransportSettings, settings.getPolicyBindingSettings(), clientContext); + this.updatePolicyBindingCallable = + callableFactory.createUnaryCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingSettings(), + clientContext); + this.updatePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.deletePolicyBindingCallable = + callableFactory.createUnaryCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingSettings(), + clientContext); + this.deletePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.listPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.listPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createPolicyBindingCallable() { + return createPolicyBindingCallable; + } + + @Override + public OperationCallable + createPolicyBindingOperationCallable() { + return createPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable getPolicyBindingCallable() { + return getPolicyBindingCallable; + } + + @Override + public UnaryCallable updatePolicyBindingCallable() { + return updatePolicyBindingCallable; + } + + @Override + public OperationCallable + updatePolicyBindingOperationCallable() { + return updatePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable deletePolicyBindingCallable() { + return deletePolicyBindingCallable; + } + + @Override + public OperationCallable + deletePolicyBindingOperationCallable() { + return deletePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsCallable() { + return listPolicyBindingsCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsPagedCallable() { + return listPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsCallable() { + return searchTargetPolicyBindingsCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + return searchTargetPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java new file mode 100644 index 000000000000..3d1853d5a8c0 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPrincipalAccessBoundaryPoliciesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..0aeb5c727b47 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/GrpcPrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,504 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPrincipalAccessBoundaryPoliciesStub extends PrincipalAccessBoundaryPoliciesStub { + private static final MethodDescriptor + createPrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/CreatePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/GetPrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PrincipalAccessBoundaryPolicy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/UpdatePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePrincipalAccessBoundaryPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/DeletePrincipalAccessBoundaryPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/ListPrincipalAccessBoundaryPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/SearchPrincipalAccessBoundaryPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller( + SearchPrincipalAccessBoundaryPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + SearchPrincipalAccessBoundaryPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyCallable; + private final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create( + PrincipalAccessBoundaryPoliciesStubSettings settings) throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create(ClientContext clientContext) + throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcPrincipalAccessBoundaryPoliciesStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPrincipalAccessBoundaryPoliciesCallableFactory()); + } + + /** + * Constructs an instance of GrpcPrincipalAccessBoundaryPoliciesStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createPrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getPrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(getPrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + updatePrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "principal_access_boundary_policy.name", + String.valueOf(request.getPrincipalAccessBoundaryPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deletePrincipalAccessBoundaryPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePrincipalAccessBoundaryPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listPrincipalAccessBoundaryPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.createPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.createPrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.getPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + getPrincipalAccessBoundaryPolicyTransportSettings, + settings.getPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.deletePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.deletePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + operationsStub); + this.listPrincipalAccessBoundaryPoliciesCallable = + callableFactory.createUnaryCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.listPrincipalAccessBoundaryPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return createPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return createPrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return getPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return updatePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return updatePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return deletePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return deletePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return listPrincipalAccessBoundaryPoliciesCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return listPrincipalAccessBoundaryPoliciesPagedCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsCallableFactory.java new file mode 100644 index 000000000000..23da209d3db7 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the PolicyBindings service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPolicyBindingsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsStub.java new file mode 100644 index 000000000000..034e8528932a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPolicyBindingsStub.java @@ -0,0 +1,670 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.ListPolicyBindingsResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3beta.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPolicyBindingsStub extends PolicyBindingsStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(PolicyBinding.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createPolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/CreatePolicyBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{parent=projects/*/locations/*}/policyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{parent=folders/*/locations/*}/policyBindings", + "/v3beta/{parent=organizations/*/locations/*}/policyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "policyBindingId", request.getPolicyBindingId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policyBinding", request.getPolicyBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getPolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/GetPolicyBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{name=folders/*/locations/*/policyBindings/*}", + "/v3beta/{name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PolicyBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/UpdatePolicyBinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{policyBinding.name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policyBinding.name", request.getPolicyBinding().getName()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{policyBinding.name=folders/*/locations/*/policyBindings/*}", + "/v3beta/{policyBinding.name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("policyBinding", request.getPolicyBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/DeletePolicyBinding") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{name=projects/*/locations/*/policyBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{name=folders/*/locations/*/policyBindings/*}", + "/v3beta/{name=organizations/*/locations/*/policyBindings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listPolicyBindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/ListPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{parent=projects/*/locations/*}/policyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{parent=folders/*/locations/*}/policyBindings", + "/v3beta/{parent=organizations/*/locations/*}/policyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.iam.v3beta.PolicyBindings/SearchTargetPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindings", + "/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "target", request.getTarget()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchTargetPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createPolicyBindingCallable; + private final OperationCallable + createPolicyBindingOperationCallable; + private final UnaryCallable getPolicyBindingCallable; + private final UnaryCallable updatePolicyBindingCallable; + private final OperationCallable + updatePolicyBindingOperationCallable; + private final UnaryCallable deletePolicyBindingCallable; + private final OperationCallable + deletePolicyBindingOperationCallable; + private final UnaryCallable + listPolicyBindingsCallable; + private final UnaryCallable + listPolicyBindingsPagedCallable; + private final UnaryCallable + searchTargetPolicyBindingsCallable; + private final UnaryCallable< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPolicyBindingsStub create(PolicyBindingsStubSettings settings) + throws IOException { + return new HttpJsonPolicyBindingsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPolicyBindingsStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPolicyBindingsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPolicyBindingsStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonPolicyBindingsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPolicyBindingsStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonPolicyBindingsStub( + PolicyBindingsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3beta/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + createPolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getPolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + updatePolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "policy_binding.name", + String.valueOf(request.getPolicyBinding().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listPolicyBindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + searchTargetPolicyBindingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchTargetPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createPolicyBindingCallable = + callableFactory.createUnaryCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingSettings(), + clientContext); + this.createPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createPolicyBindingTransportSettings, + settings.createPolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getPolicyBindingCallable = + callableFactory.createUnaryCallable( + getPolicyBindingTransportSettings, settings.getPolicyBindingSettings(), clientContext); + this.updatePolicyBindingCallable = + callableFactory.createUnaryCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingSettings(), + clientContext); + this.updatePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + updatePolicyBindingTransportSettings, + settings.updatePolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePolicyBindingCallable = + callableFactory.createUnaryCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingSettings(), + clientContext); + this.deletePolicyBindingOperationCallable = + callableFactory.createOperationCallable( + deletePolicyBindingTransportSettings, + settings.deletePolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.listPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listPolicyBindingsTransportSettings, + settings.listPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + this.searchTargetPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchTargetPolicyBindingsTransportSettings, + settings.searchTargetPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPolicyBindingMethodDescriptor); + methodDescriptors.add(getPolicyBindingMethodDescriptor); + methodDescriptors.add(updatePolicyBindingMethodDescriptor); + methodDescriptors.add(deletePolicyBindingMethodDescriptor); + methodDescriptors.add(listPolicyBindingsMethodDescriptor); + methodDescriptors.add(searchTargetPolicyBindingsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createPolicyBindingCallable() { + return createPolicyBindingCallable; + } + + @Override + public OperationCallable + createPolicyBindingOperationCallable() { + return createPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable getPolicyBindingCallable() { + return getPolicyBindingCallable; + } + + @Override + public UnaryCallable updatePolicyBindingCallable() { + return updatePolicyBindingCallable; + } + + @Override + public OperationCallable + updatePolicyBindingOperationCallable() { + return updatePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable deletePolicyBindingCallable() { + return deletePolicyBindingCallable; + } + + @Override + public OperationCallable + deletePolicyBindingOperationCallable() { + return deletePolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsCallable() { + return listPolicyBindingsCallable; + } + + @Override + public UnaryCallable + listPolicyBindingsPagedCallable() { + return listPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsCallable() { + return searchTargetPolicyBindingsCallable; + } + + @Override + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + return searchTargetPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java new file mode 100644 index 000000000000..64fd6a370b37 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..59b0e60fb9ee --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/HttpJsonPrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,738 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPrincipalAccessBoundaryPoliciesStub + extends PrincipalAccessBoundaryPoliciesStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(PrincipalAccessBoundaryPolicy.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createPrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/CreatePrincipalAccessBoundaryPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "principalAccessBoundaryPolicyId", + request.getPrincipalAccessBoundaryPolicyId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "principalAccessBoundaryPolicy", + request.getPrincipalAccessBoundaryPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/GetPrincipalAccessBoundaryPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PrincipalAccessBoundaryPolicy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/UpdatePrincipalAccessBoundaryPolicy") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3beta/{principalAccessBoundaryPolicy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "principalAccessBoundaryPolicy.name", + request.getPrincipalAccessBoundaryPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "principalAccessBoundaryPolicy", + request.getPrincipalAccessBoundaryPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePrincipalAccessBoundaryPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/DeletePrincipalAccessBoundaryPolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePrincipalAccessBoundaryPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/ListPrincipalAccessBoundaryPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.iam.v3beta.PrincipalAccessBoundaryPolicies/SearchPrincipalAccessBoundaryPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + SearchPrincipalAccessBoundaryPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createPrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicyCallable; + private final UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable; + private final OperationCallable< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable; + private final UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable; + private final UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + PrincipalAccessBoundaryPoliciesStubSettings settings) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPrincipalAccessBoundaryPoliciesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonPrincipalAccessBoundaryPoliciesStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPrincipalAccessBoundaryPoliciesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPrincipalAccessBoundaryPoliciesStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPrincipalAccessBoundaryPoliciesStub( + PrincipalAccessBoundaryPoliciesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3beta/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + createPrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getPrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(getPrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + updatePrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "principal_access_boundary_policy.name", + String.valueOf(request.getPrincipalAccessBoundaryPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePrincipalAccessBoundaryPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePrincipalAccessBoundaryPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listPrincipalAccessBoundaryPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.createPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.createPrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + createPrincipalAccessBoundaryPolicyTransportSettings, + settings.createPrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getPrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + getPrincipalAccessBoundaryPolicyTransportSettings, + settings.getPrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.updatePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + updatePrincipalAccessBoundaryPolicyTransportSettings, + settings.updatePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePrincipalAccessBoundaryPolicyCallable = + callableFactory.createUnaryCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicySettings(), + clientContext); + this.deletePrincipalAccessBoundaryPolicyOperationCallable = + callableFactory.createOperationCallable( + deletePrincipalAccessBoundaryPolicyTransportSettings, + settings.deletePrincipalAccessBoundaryPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listPrincipalAccessBoundaryPoliciesCallable = + callableFactory.createUnaryCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.listPrincipalAccessBoundaryPoliciesPagedCallable = + callableFactory.createPagedCallable( + listPrincipalAccessBoundaryPoliciesTransportSettings, + settings.listPrincipalAccessBoundaryPoliciesSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsCallable = + callableFactory.createUnaryCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + this.searchPrincipalAccessBoundaryPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + searchPrincipalAccessBoundaryPolicyBindingsTransportSettings, + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(getPrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(updatePrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(deletePrincipalAccessBoundaryPolicyMethodDescriptor); + methodDescriptors.add(listPrincipalAccessBoundaryPoliciesMethodDescriptor); + methodDescriptors.add(searchPrincipalAccessBoundaryPolicyBindingsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + return createPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + return createPrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + return getPrincipalAccessBoundaryPolicyCallable; + } + + @Override + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + return updatePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + return updatePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + return deletePrincipalAccessBoundaryPolicyCallable; + } + + @Override + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + return deletePrincipalAccessBoundaryPolicyOperationCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + return listPrincipalAccessBoundaryPoliciesCallable; + } + + @Override + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + return listPrincipalAccessBoundaryPoliciesPagedCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + return searchPrincipalAccessBoundaryPolicyBindingsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStub.java new file mode 100644 index 000000000000..1ab8d32e541c --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStub.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.ListPolicyBindingsResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3beta.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PolicyBindings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class PolicyBindingsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createPolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPolicyBindingOperationCallable()"); + } + + public UnaryCallable createPolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyBindingCallable()"); + } + + public UnaryCallable getPolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyBindingCallable()"); + } + + public OperationCallable + updatePolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePolicyBindingOperationCallable()"); + } + + public UnaryCallable updatePolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyBindingCallable()"); + } + + public OperationCallable + deletePolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePolicyBindingOperationCallable()"); + } + + public UnaryCallable deletePolicyBindingCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyBindingCallable()"); + } + + public UnaryCallable + listPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyBindingsPagedCallable()"); + } + + public UnaryCallable + listPolicyBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyBindingsCallable()"); + } + + public UnaryCallable + searchTargetPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchTargetPolicyBindingsPagedCallable()"); + } + + public UnaryCallable + searchTargetPolicyBindingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchTargetPolicyBindingsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStubSettings.java new file mode 100644 index 000000000000..6e97ccef63a7 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PolicyBindingsStubSettings.java @@ -0,0 +1,835 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.ListPolicyBindingsResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3beta.SearchTargetPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyBindingsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsStubSettings.newBuilder();
+ * policyBindingsSettingsBuilder
+ *     .getPolicyBindingSettings()
+ *     .setRetrySettings(
+ *         policyBindingsSettingsBuilder
+ *             .getPolicyBindingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBindingsStubSettings policyBindingsSettings = policyBindingsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPolicyBinding: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder =
+ *     PolicyBindingsStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBindingsSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PolicyBindingsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createPolicyBindingSettings; + private final OperationCallSettings + createPolicyBindingOperationSettings; + private final UnaryCallSettings getPolicyBindingSettings; + private final UnaryCallSettings + updatePolicyBindingSettings; + private final OperationCallSettings + updatePolicyBindingOperationSettings; + private final UnaryCallSettings + deletePolicyBindingSettings; + private final OperationCallSettings + deletePolicyBindingOperationSettings; + private final PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings; + private final PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings; + + private static final PagedListDescriptor< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, PolicyBinding> + LIST_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPolicyBindingsRequest injectToken( + ListPolicyBindingsRequest payload, String token) { + return ListPolicyBindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPolicyBindingsRequest injectPageSize( + ListPolicyBindingsRequest payload, int pageSize) { + return ListPolicyBindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListDescriptor< + SearchTargetPolicyBindingsRequest, SearchTargetPolicyBindingsResponse, PolicyBinding> + SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchTargetPolicyBindingsRequest injectToken( + SearchTargetPolicyBindingsRequest payload, String token) { + return SearchTargetPolicyBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchTargetPolicyBindingsRequest injectPageSize( + SearchTargetPolicyBindingsRequest payload, int pageSize) { + return SearchTargetPolicyBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(SearchTargetPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchTargetPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchTargetPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListResponseFactory< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + LIST_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPolicyBindingsRequest, + ListPolicyBindingsResponse, + ListPolicyBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_POLICY_BINDINGS_PAGE_STR_DESC, request, context); + return ListPolicyBindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + SearchTargetPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + PolicyBinding> + pageContext = + PageContext.create( + callable, SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_DESC, request, context); + return SearchTargetPolicyBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings createPolicyBindingSettings() { + return createPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to createPolicyBinding. */ + public OperationCallSettings + createPolicyBindingOperationSettings() { + return createPolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings getPolicyBindingSettings() { + return getPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings updatePolicyBindingSettings() { + return updatePolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings + updatePolicyBindingOperationSettings() { + return updatePolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings deletePolicyBindingSettings() { + return deletePolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings + deletePolicyBindingOperationSettings() { + return deletePolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to listPolicyBindings. */ + public PagedCallSettings< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return listPolicyBindingsSettings; + } + + /** Returns the object with the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return searchTargetPolicyBindingsSettings; + } + + public PolicyBindingsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPolicyBindingsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPolicyBindingsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyBindingsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyBindingsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyBindingsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyBindingsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createPolicyBindingSettings = settingsBuilder.createPolicyBindingSettings().build(); + createPolicyBindingOperationSettings = + settingsBuilder.createPolicyBindingOperationSettings().build(); + getPolicyBindingSettings = settingsBuilder.getPolicyBindingSettings().build(); + updatePolicyBindingSettings = settingsBuilder.updatePolicyBindingSettings().build(); + updatePolicyBindingOperationSettings = + settingsBuilder.updatePolicyBindingOperationSettings().build(); + deletePolicyBindingSettings = settingsBuilder.deletePolicyBindingSettings().build(); + deletePolicyBindingOperationSettings = + settingsBuilder.deletePolicyBindingOperationSettings().build(); + listPolicyBindingsSettings = settingsBuilder.listPolicyBindingsSettings().build(); + searchTargetPolicyBindingsSettings = + settingsBuilder.searchTargetPolicyBindingsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PolicyBindingsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createPolicyBindingSettings; + private final OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings; + private final UnaryCallSettings.Builder + getPolicyBindingSettings; + private final UnaryCallSettings.Builder + updatePolicyBindingSettings; + private final OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings; + private final UnaryCallSettings.Builder + deletePolicyBindingSettings; + private final OperationCallSettings.Builder< + DeletePolicyBindingRequest, Empty, OperationMetadata> + deletePolicyBindingOperationSettings; + private final PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings; + private final PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + getPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + deletePolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + listPolicyBindingsSettings = PagedCallSettings.newBuilder(LIST_POLICY_BINDINGS_PAGE_STR_FACT); + searchTargetPolicyBindingsSettings = + PagedCallSettings.newBuilder(SEARCH_TARGET_POLICY_BINDINGS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPolicyBindingSettings, + getPolicyBindingSettings, + updatePolicyBindingSettings, + deletePolicyBindingSettings, + listPolicyBindingsSettings, + searchTargetPolicyBindingsSettings); + initDefaults(this); + } + + protected Builder(PolicyBindingsStubSettings settings) { + super(settings); + + createPolicyBindingSettings = settings.createPolicyBindingSettings.toBuilder(); + createPolicyBindingOperationSettings = + settings.createPolicyBindingOperationSettings.toBuilder(); + getPolicyBindingSettings = settings.getPolicyBindingSettings.toBuilder(); + updatePolicyBindingSettings = settings.updatePolicyBindingSettings.toBuilder(); + updatePolicyBindingOperationSettings = + settings.updatePolicyBindingOperationSettings.toBuilder(); + deletePolicyBindingSettings = settings.deletePolicyBindingSettings.toBuilder(); + deletePolicyBindingOperationSettings = + settings.deletePolicyBindingOperationSettings.toBuilder(); + listPolicyBindingsSettings = settings.listPolicyBindingsSettings.toBuilder(); + searchTargetPolicyBindingsSettings = settings.searchTargetPolicyBindingsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPolicyBindingSettings, + getPolicyBindingSettings, + updatePolicyBindingSettings, + deletePolicyBindingSettings, + listPolicyBindingsSettings, + searchTargetPolicyBindingsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchTargetPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public UnaryCallSettings.Builder + createPolicyBindingSettings() { + return createPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to createPolicyBinding. */ + public OperationCallSettings.Builder< + CreatePolicyBindingRequest, PolicyBinding, OperationMetadata> + createPolicyBindingOperationSettings() { + return createPolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPolicyBinding. */ + public UnaryCallSettings.Builder + getPolicyBindingSettings() { + return getPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public UnaryCallSettings.Builder + updatePolicyBindingSettings() { + return updatePolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicyBinding. */ + public OperationCallSettings.Builder< + UpdatePolicyBindingRequest, PolicyBinding, OperationMetadata> + updatePolicyBindingOperationSettings() { + return updatePolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public UnaryCallSettings.Builder + deletePolicyBindingSettings() { + return deletePolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBinding. */ + public OperationCallSettings.Builder + deletePolicyBindingOperationSettings() { + return deletePolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to listPolicyBindings. */ + public PagedCallSettings.Builder< + ListPolicyBindingsRequest, ListPolicyBindingsResponse, ListPolicyBindingsPagedResponse> + listPolicyBindingsSettings() { + return listPolicyBindingsSettings; + } + + /** Returns the builder for the settings used for calls to searchTargetPolicyBindings. */ + public PagedCallSettings.Builder< + SearchTargetPolicyBindingsRequest, + SearchTargetPolicyBindingsResponse, + SearchTargetPolicyBindingsPagedResponse> + searchTargetPolicyBindingsSettings() { + return searchTargetPolicyBindingsSettings; + } + + @Override + public PolicyBindingsStubSettings build() throws IOException { + return new PolicyBindingsStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStub.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStub.java new file mode 100644 index 000000000000..5cf2decd6741 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStub.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PrincipalAccessBoundaryPolicies service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class PrincipalAccessBoundaryPoliciesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + createPrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPrincipalAccessBoundaryPolicyCallable()"); + } + + public UnaryCallable + getPrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: getPrincipalAccessBoundaryPolicyCallable()"); + } + + public OperationCallable< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + updatePrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePrincipalAccessBoundaryPolicyCallable()"); + } + + public OperationCallable + deletePrincipalAccessBoundaryPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePrincipalAccessBoundaryPolicyOperationCallable()"); + } + + public UnaryCallable + deletePrincipalAccessBoundaryPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePrincipalAccessBoundaryPolicyCallable()"); + } + + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPrincipalAccessBoundaryPoliciesPagedCallable()"); + } + + public UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPoliciesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPrincipalAccessBoundaryPoliciesCallable()"); + } + + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchPrincipalAccessBoundaryPolicyBindingsPagedCallable()"); + } + + public UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchPrincipalAccessBoundaryPolicyBindingsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStubSettings.java b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStubSettings.java new file mode 100644 index 000000000000..4c7878a1f80c --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/java/com/google/iam/v3beta/stub/PrincipalAccessBoundaryPoliciesStubSettings.java @@ -0,0 +1,952 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PrincipalAccessBoundaryPoliciesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (iam.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesStubSettings.Builder
+ *     principalAccessBoundaryPoliciesSettingsBuilder =
+ *         PrincipalAccessBoundaryPoliciesStubSettings.newBuilder();
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .getPrincipalAccessBoundaryPolicySettings()
+ *     .setRetrySettings(
+ *         principalAccessBoundaryPoliciesSettingsBuilder
+ *             .getPrincipalAccessBoundaryPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PrincipalAccessBoundaryPoliciesStubSettings principalAccessBoundaryPoliciesSettings =
+ *     principalAccessBoundaryPoliciesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createPrincipalAccessBoundaryPolicy: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PrincipalAccessBoundaryPoliciesStubSettings.Builder
+ *     principalAccessBoundaryPoliciesSettingsBuilder =
+ *         PrincipalAccessBoundaryPoliciesStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * principalAccessBoundaryPoliciesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class PrincipalAccessBoundaryPoliciesStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings; + private final UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings; + private final PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings; + private final PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings; + + private static final PagedListDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPrincipalAccessBoundaryPoliciesRequest injectToken( + ListPrincipalAccessBoundaryPoliciesRequest payload, String token) { + return ListPrincipalAccessBoundaryPoliciesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListPrincipalAccessBoundaryPoliciesRequest injectPageSize( + ListPrincipalAccessBoundaryPoliciesRequest payload, int pageSize) { + return ListPrincipalAccessBoundaryPoliciesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListPrincipalAccessBoundaryPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPrincipalAccessBoundaryPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPrincipalAccessBoundaryPoliciesResponse payload) { + return payload.getPrincipalAccessBoundaryPoliciesList(); + } + }; + + private static final PagedListDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest injectToken( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload, String token) { + return SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest injectPageSize( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload, int pageSize) { + return SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + SearchPrincipalAccessBoundaryPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken( + SearchPrincipalAccessBoundaryPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchPrincipalAccessBoundaryPolicyBindingsResponse payload) { + return payload.getPolicyBindingsList(); + } + }; + + private static final PagedListResponseFactory< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse> + callable, + ListPrincipalAccessBoundaryPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + PrincipalAccessBoundaryPolicy> + pageContext = + PageContext.create( + callable, + LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_DESC, + request, + context); + return ListPrincipalAccessBoundaryPoliciesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + callable, + SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + PolicyBinding> + pageContext = + PageContext.create( + callable, + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_DESC, + request, + context); + return SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + createPrincipalAccessBoundaryPolicySettings() { + return createPrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to createPrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return createPrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + getPrincipalAccessBoundaryPolicySettings() { + return getPrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + updatePrincipalAccessBoundaryPolicySettings() { + return updatePrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to updatePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return updatePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings + deletePrincipalAccessBoundaryPolicySettings() { + return deletePrincipalAccessBoundaryPolicySettings; + } + + /** Returns the object with the settings used for calls to deletePrincipalAccessBoundaryPolicy. */ + public OperationCallSettings + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return deletePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to listPrincipalAccessBoundaryPolicies. */ + public PagedCallSettings< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return listPrincipalAccessBoundaryPoliciesSettings; + } + + /** + * Returns the object with the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return searchPrincipalAccessBoundaryPolicyBindingsSettings; + } + + public PrincipalAccessBoundaryPoliciesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPrincipalAccessBoundaryPoliciesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPrincipalAccessBoundaryPoliciesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "iam"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "iam.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "iam.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PrincipalAccessBoundaryPoliciesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PrincipalAccessBoundaryPoliciesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PrincipalAccessBoundaryPoliciesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PrincipalAccessBoundaryPoliciesStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + createPrincipalAccessBoundaryPolicySettings = + settingsBuilder.createPrincipalAccessBoundaryPolicySettings().build(); + createPrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.createPrincipalAccessBoundaryPolicyOperationSettings().build(); + getPrincipalAccessBoundaryPolicySettings = + settingsBuilder.getPrincipalAccessBoundaryPolicySettings().build(); + updatePrincipalAccessBoundaryPolicySettings = + settingsBuilder.updatePrincipalAccessBoundaryPolicySettings().build(); + updatePrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.updatePrincipalAccessBoundaryPolicyOperationSettings().build(); + deletePrincipalAccessBoundaryPolicySettings = + settingsBuilder.deletePrincipalAccessBoundaryPolicySettings().build(); + deletePrincipalAccessBoundaryPolicyOperationSettings = + settingsBuilder.deletePrincipalAccessBoundaryPolicyOperationSettings().build(); + listPrincipalAccessBoundaryPoliciesSettings = + settingsBuilder.listPrincipalAccessBoundaryPoliciesSettings().build(); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + settingsBuilder.searchPrincipalAccessBoundaryPolicyBindingsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.api.grpc:proto-google-iam-v1") + .setRepository("googleapis/sdk-platform-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for PrincipalAccessBoundaryPoliciesStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings; + private final UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings; + private final UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings; + private final OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings; + private final PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings; + private final PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + getPrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + deletePrincipalAccessBoundaryPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePrincipalAccessBoundaryPolicyOperationSettings = OperationCallSettings.newBuilder(); + listPrincipalAccessBoundaryPoliciesSettings = + PagedCallSettings.newBuilder(LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_PAGE_STR_FACT); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + PagedCallSettings.newBuilder( + SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPrincipalAccessBoundaryPolicySettings, + getPrincipalAccessBoundaryPolicySettings, + updatePrincipalAccessBoundaryPolicySettings, + deletePrincipalAccessBoundaryPolicySettings, + listPrincipalAccessBoundaryPoliciesSettings, + searchPrincipalAccessBoundaryPolicyBindingsSettings); + initDefaults(this); + } + + protected Builder(PrincipalAccessBoundaryPoliciesStubSettings settings) { + super(settings); + + createPrincipalAccessBoundaryPolicySettings = + settings.createPrincipalAccessBoundaryPolicySettings.toBuilder(); + createPrincipalAccessBoundaryPolicyOperationSettings = + settings.createPrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + getPrincipalAccessBoundaryPolicySettings = + settings.getPrincipalAccessBoundaryPolicySettings.toBuilder(); + updatePrincipalAccessBoundaryPolicySettings = + settings.updatePrincipalAccessBoundaryPolicySettings.toBuilder(); + updatePrincipalAccessBoundaryPolicyOperationSettings = + settings.updatePrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + deletePrincipalAccessBoundaryPolicySettings = + settings.deletePrincipalAccessBoundaryPolicySettings.toBuilder(); + deletePrincipalAccessBoundaryPolicyOperationSettings = + settings.deletePrincipalAccessBoundaryPolicyOperationSettings.toBuilder(); + listPrincipalAccessBoundaryPoliciesSettings = + settings.listPrincipalAccessBoundaryPoliciesSettings.toBuilder(); + searchPrincipalAccessBoundaryPolicyBindingsSettings = + settings.searchPrincipalAccessBoundaryPolicyBindingsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPrincipalAccessBoundaryPolicySettings, + getPrincipalAccessBoundaryPolicySettings, + updatePrincipalAccessBoundaryPolicySettings, + deletePrincipalAccessBoundaryPolicySettings, + listPrincipalAccessBoundaryPoliciesSettings, + searchPrincipalAccessBoundaryPolicyBindingsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getPrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePrincipalAccessBoundaryPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPrincipalAccessBoundaryPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchPrincipalAccessBoundaryPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + PrincipalAccessBoundaryPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + PrincipalAccessBoundaryPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePrincipalAccessBoundaryPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + createPrincipalAccessBoundaryPolicySettings() { + return createPrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to createPrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + CreatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + createPrincipalAccessBoundaryPolicyOperationSettings() { + return createPrincipalAccessBoundaryPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPrincipalAccessBoundaryPolicy. */ + public UnaryCallSettings.Builder< + GetPrincipalAccessBoundaryPolicyRequest, PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicySettings() { + return getPrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + updatePrincipalAccessBoundaryPolicySettings() { + return updatePrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to updatePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + UpdatePrincipalAccessBoundaryPolicyRequest, + PrincipalAccessBoundaryPolicy, + OperationMetadata> + updatePrincipalAccessBoundaryPolicyOperationSettings() { + return updatePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public UnaryCallSettings.Builder + deletePrincipalAccessBoundaryPolicySettings() { + return deletePrincipalAccessBoundaryPolicySettings; + } + + /** + * Returns the builder for the settings used for calls to deletePrincipalAccessBoundaryPolicy. + */ + public OperationCallSettings.Builder< + DeletePrincipalAccessBoundaryPolicyRequest, Empty, OperationMetadata> + deletePrincipalAccessBoundaryPolicyOperationSettings() { + return deletePrincipalAccessBoundaryPolicyOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to listPrincipalAccessBoundaryPolicies. + */ + public PagedCallSettings.Builder< + ListPrincipalAccessBoundaryPoliciesRequest, + ListPrincipalAccessBoundaryPoliciesResponse, + ListPrincipalAccessBoundaryPoliciesPagedResponse> + listPrincipalAccessBoundaryPoliciesSettings() { + return listPrincipalAccessBoundaryPoliciesSettings; + } + + /** + * Returns the builder for the settings used for calls to + * searchPrincipalAccessBoundaryPolicyBindings. + */ + public PagedCallSettings.Builder< + SearchPrincipalAccessBoundaryPolicyBindingsRequest, + SearchPrincipalAccessBoundaryPolicyBindingsResponse, + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse> + searchPrincipalAccessBoundaryPolicyBindingsSettings() { + return searchPrincipalAccessBoundaryPolicyBindingsSettings; + } + + @Override + public PrincipalAccessBoundaryPoliciesStubSettings build() throws IOException { + return new PrincipalAccessBoundaryPoliciesStubSettings(this); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2/reflect-config.json b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2/reflect-config.json new file mode 100644 index 000000000000..af52ed3fb969 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2/reflect-config.json @@ -0,0 +1,1703 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.CreatePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.CreatePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.DeletePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.DeletePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.DenyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.DenyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.GetPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.GetPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.ListPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.ListPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.ListPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.ListPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.PolicyOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.PolicyOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.PolicyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.PolicyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.UpdatePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2.UpdatePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2beta/reflect-config.json b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2beta/reflect-config.json new file mode 100644 index 000000000000..594735490e5b --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v2beta/reflect-config.json @@ -0,0 +1,1703 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.CreatePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.CreatePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.DeletePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.DeletePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.DenyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.DenyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.GetPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.GetPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.ListPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.ListPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.ListPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.ListPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.PolicyOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.PolicyOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.PolicyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.PolicyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.UpdatePolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v2beta.UpdatePolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3/reflect-config.json b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3/reflect-config.json new file mode 100644 index 000000000000..c847ccd9d33b --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3/reflect-config.json @@ -0,0 +1,2072 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.CreatePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.CreatePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.DeletePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.DeletePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.GetPolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.GetPolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PolicyBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PolicyBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PolicyBinding$PolicyKind", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PolicyBinding$Target", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PolicyBinding$Target$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.PrincipalAccessBoundaryPolicyRule$Effect", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchTargetPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchTargetPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchTargetPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.SearchTargetPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.UpdatePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.UpdatePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3beta/reflect-config.json b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3beta/reflect-config.json new file mode 100644 index 000000000000..358fac255410 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/main/resources/META-INF/native-image/com.google.iam.v3beta/reflect-config.json @@ -0,0 +1,2072 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.CreatePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.CreatePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.DeletePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.DeletePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.GetPolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.GetPolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PolicyBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PolicyBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PolicyBinding$PolicyKind", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PolicyBinding$Target", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PolicyBinding$Target$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule$Effect", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchTargetPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchTargetPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchTargetPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.SearchTargetPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.UpdatePolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.UpdatePolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPolicies.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPolicies.java new file mode 100644 index 000000000000..de45d924f396 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPolicies.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicies implements MockGrpcService { + private final MockPoliciesImpl serviceImpl; + + public MockPolicies() { + serviceImpl = new MockPoliciesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPoliciesImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPoliciesImpl.java new file mode 100644 index 000000000000..805ba34c9ef0 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/MockPoliciesImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import com.google.api.core.BetaApi; +import com.google.iam.v2.PoliciesGrpc.PoliciesImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPoliciesImpl extends PoliciesImplBase { + private List requests; + private Queue responses; + + public MockPoliciesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listPolicies( + ListPoliciesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicy(GetPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPolicy( + CreatePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicy( + UpdatePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicy( + DeletePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java new file mode 100644 index 000000000000..400b802e0a0a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java @@ -0,0 +1,399 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v2.stub.HttpJsonPoliciesStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PoliciesClientHttpJsonTest { + private static MockHttpService mockService; + private static PoliciesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPoliciesStub.getMethodDescriptors(), PoliciesSettings.getDefaultEndpoint()); + PoliciesSettings settings = + PoliciesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PoliciesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PoliciesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listPoliciesTest() throws Exception { + Policy responsesElement = Policy.newBuilder().build(); + ListPoliciesResponse expectedResponse = + ListPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "policies/policie-1456/policie-1456"; + + ListPoliciesPagedResponse pagedListResponse = client.listPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "policies/policie-1456/policie-1456"; + client.listPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + mockService.addResponse(expectedResponse); + + String name = "policies/policie-3260/policie-3260/policie-3260"; + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "policies/policie-3260/policie-3260/policie-3260"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "policies/policie-1456/policie-1456"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + + Policy actualResponse = client.createPolicyAsync(parent, policy, policyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "policies/policie-1456/policie-1456"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + client.createPolicyAsync(parent, policy, policyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updatePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder() + .setPolicy( + Policy.newBuilder() + .setName("policies/policie-3260/policie-3260/policie-3260") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build()) + .build(); + + Policy actualResponse = client.updatePolicyAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder() + .setPolicy( + Policy.newBuilder() + .setName("policies/policie-3260/policie-3260/policie-3260") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build()) + .build(); + client.updatePolicyAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "policies/policie-3260/policie-3260/policie-3260"; + + Policy actualResponse = client.deletePolicyAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "policies/policie-3260/policie-3260/policie-3260"; + client.deletePolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientTest.java new file mode 100644 index 000000000000..12f600a62225 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2/PoliciesClientTest.java @@ -0,0 +1,355 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2; + +import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PoliciesClientTest { + private static MockPolicies mockPolicies; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PoliciesClient client; + + @BeforeClass + public static void startStaticServer() { + mockPolicies = new MockPolicies(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPolicies)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PoliciesSettings settings = + PoliciesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PoliciesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listPoliciesTest() throws Exception { + Policy responsesElement = Policy.newBuilder().build(); + ListPoliciesResponse expectedResponse = + ListPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicies(Arrays.asList(responsesElement)) + .build(); + mockPolicies.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPoliciesPagedResponse pagedListResponse = client.listPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPoliciesRequest actualRequest = ((ListPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + mockPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyRequest actualRequest = ((GetPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String name = "name3373707"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + + Policy actualResponse = client.createPolicyAsync(parent, policy, policyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyRequest actualRequest = ((CreatePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertEquals(policyId, actualRequest.getPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + client.createPolicyAsync(parent, policy, policyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updatePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + + Policy actualResponse = client.updatePolicyAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePolicyRequest actualRequest = ((UpdatePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + client.updatePolicyAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .setManagingAuthority("managingAuthority867537025") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + String name = "name3373707"; + + Policy actualResponse = client.deletePolicyAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyRequest actualRequest = ((DeletePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPolicies.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPolicies.java new file mode 100644 index 000000000000..a0e9a9e0edc8 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPolicies.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicies implements MockGrpcService { + private final MockPoliciesImpl serviceImpl; + + public MockPolicies() { + serviceImpl = new MockPoliciesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPoliciesImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPoliciesImpl.java new file mode 100644 index 000000000000..bed1cc0518cd --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/MockPoliciesImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import com.google.api.core.BetaApi; +import com.google.iam.v2beta.PoliciesGrpc.PoliciesImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPoliciesImpl extends PoliciesImplBase { + private List requests; + private Queue responses; + + public MockPoliciesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listPolicies( + ListPoliciesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicy(GetPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPolicy( + CreatePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicy( + UpdatePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicy( + DeletePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientHttpJsonTest.java new file mode 100644 index 000000000000..93adce1053fc --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientHttpJsonTest.java @@ -0,0 +1,393 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v2beta.stub.HttpJsonPoliciesStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PoliciesClientHttpJsonTest { + private static MockHttpService mockService; + private static PoliciesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPoliciesStub.getMethodDescriptors(), PoliciesSettings.getDefaultEndpoint()); + PoliciesSettings settings = + PoliciesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PoliciesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PoliciesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listPoliciesTest() throws Exception { + Policy responsesElement = Policy.newBuilder().build(); + ListPoliciesResponse expectedResponse = + ListPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "policies/policie-1456/policie-1456"; + + ListPoliciesPagedResponse pagedListResponse = client.listPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "policies/policie-1456/policie-1456"; + client.listPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "policies/policie-3260/policie-3260/policie-3260"; + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "policies/policie-3260/policie-3260/policie-3260"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "policies/policie-1456/policie-1456"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + + Policy actualResponse = client.createPolicyAsync(parent, policy, policyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "policies/policie-1456/policie-1456"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + client.createPolicyAsync(parent, policy, policyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updatePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder() + .setPolicy( + Policy.newBuilder() + .setName("policies/policie-3260/policie-3260/policie-3260") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build()) + .build(); + + Policy actualResponse = client.updatePolicyAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder() + .setPolicy( + Policy.newBuilder() + .setName("policies/policie-3260/policie-3260/policie-3260") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build()) + .build(); + client.updatePolicyAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "policies/policie-3260/policie-3260/policie-3260"; + + Policy actualResponse = client.deletePolicyAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "policies/policie-3260/policie-3260/policie-3260"; + client.deletePolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientTest.java new file mode 100644 index 000000000000..7b0e945893bb --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v2beta/PoliciesClientTest.java @@ -0,0 +1,351 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta; + +import static com.google.iam.v2beta.PoliciesClient.ListPoliciesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PoliciesClientTest { + private static MockPolicies mockPolicies; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PoliciesClient client; + + @BeforeClass + public static void startStaticServer() { + mockPolicies = new MockPolicies(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPolicies)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PoliciesSettings settings = + PoliciesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PoliciesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listPoliciesTest() throws Exception { + Policy responsesElement = Policy.newBuilder().build(); + ListPoliciesResponse expectedResponse = + ListPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicies(Arrays.asList(responsesElement)) + .build(); + mockPolicies.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPoliciesPagedResponse pagedListResponse = client.listPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPoliciesRequest actualRequest = ((ListPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyRequest actualRequest = ((GetPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String name = "name3373707"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + + Policy actualResponse = client.createPolicyAsync(parent, policy, policyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyRequest actualRequest = ((CreatePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertEquals(policyId, actualRequest.getPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + client.createPolicyAsync(parent, policy, policyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updatePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + + Policy actualResponse = client.updatePolicyAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePolicyRequest actualRequest = ((UpdatePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + client.updatePolicyAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName("name3373707") + .setUid("uid115792") + .setKind("kind3292052") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicies.addResponse(resultOperation); + + String name = "name3373707"; + + Policy actualResponse = client.deletePolicyAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyRequest actualRequest = ((DeletePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicies.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocations.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocations.java new file mode 100644 index 000000000000..777751061075 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocationsImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocationsImpl.java new file mode 100644 index 000000000000..93c49fc41d84 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockLocationsImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindings.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindings.java new file mode 100644 index 000000000000..a2743839e056 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindings.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBindings implements MockGrpcService { + private final MockPolicyBindingsImpl serviceImpl; + + public MockPolicyBindings() { + serviceImpl = new MockPolicyBindingsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindingsImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindingsImpl.java new file mode 100644 index 000000000000..b691249f6e52 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPolicyBindingsImpl.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.iam.v3.PolicyBindingsGrpc.PolicyBindingsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBindingsImpl extends PolicyBindingsImplBase { + private List requests; + private Queue responses; + + public MockPolicyBindingsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPolicyBinding( + CreatePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicyBinding( + GetPolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyBinding) { + requests.add(request); + responseObserver.onNext(((PolicyBinding) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicyBinding( + UpdatePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicyBinding( + DeletePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPolicyBindings( + ListPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPolicyBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchTargetPolicyBindings( + SearchTargetPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchTargetPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((SearchTargetPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchTargetPolicyBindings, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + SearchTargetPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPolicies.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..ac9ee3f544d7 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPrincipalAccessBoundaryPolicies implements MockGrpcService { + private final MockPrincipalAccessBoundaryPoliciesImpl serviceImpl; + + public MockPrincipalAccessBoundaryPolicies() { + serviceImpl = new MockPrincipalAccessBoundaryPoliciesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPoliciesImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPoliciesImpl.java new file mode 100644 index 000000000000..5d554ce7ff33 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/MockPrincipalAccessBoundaryPoliciesImpl.java @@ -0,0 +1,200 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.core.BetaApi; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesGrpc.PrincipalAccessBoundaryPoliciesImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPrincipalAccessBoundaryPoliciesImpl + extends PrincipalAccessBoundaryPoliciesImplBase { + private List requests; + private Queue responses; + + public MockPrincipalAccessBoundaryPoliciesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPrincipalAccessBoundaryPolicy( + CreatePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPrincipalAccessBoundaryPolicy( + GetPrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PrincipalAccessBoundaryPolicy) { + requests.add(request); + responseObserver.onNext(((PrincipalAccessBoundaryPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PrincipalAccessBoundaryPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePrincipalAccessBoundaryPolicy( + UpdatePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePrincipalAccessBoundaryPolicy( + DeletePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPrincipalAccessBoundaryPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListPrincipalAccessBoundaryPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPrincipalAccessBoundaryPolicies," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPrincipalAccessBoundaryPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((SearchPrincipalAccessBoundaryPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method" + + " SearchPrincipalAccessBoundaryPolicyBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchPrincipalAccessBoundaryPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientHttpJsonTest.java new file mode 100644 index 000000000000..46160e62a301 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientHttpJsonTest.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v3.stub.HttpJsonPolicyBindingsStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyBindingsClientHttpJsonTest { + private static MockHttpService mockService; + private static PolicyBindingsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPolicyBindingsStub.getMethodDescriptors(), + PolicyBindingsSettings.getDefaultEndpoint()); + PolicyBindingsSettings settings = + PolicyBindingsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PolicyBindingsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyBindingsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest3() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest4() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PolicyBinding policyBinding = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PolicyBinding actualResponse = client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBinding policyBinding = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientTest.java new file mode 100644 index 000000000000..2fe70b25c2b1 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PolicyBindingsClientTest.java @@ -0,0 +1,985 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyBindingsClientTest { + private static MockLocations mockLocations; + private static MockPolicyBindings mockPolicyBindings; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PolicyBindingsClient client; + + @BeforeClass + public static void startStaticServer() { + mockPolicyBindings = new MockPolicyBindings(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPolicyBindings, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PolicyBindingsSettings settings = + PolicyBindingsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyBindingsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest3() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest4() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + String parent = "parent-995424086"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBindingRequest actualRequest = ((GetPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String name = "name3373707"; + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBindingRequest actualRequest = ((GetPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String name = "name3373707"; + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PolicyBinding actualResponse = client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePolicyBindingRequest actualRequest = ((UpdatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBindingRequest actualRequest = ((DeletePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBindingRequest actualRequest = ((DeletePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java new file mode 100644 index 000000000000..0e8136badad7 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java @@ -0,0 +1,747 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v3.stub.HttpJsonPrincipalAccessBoundaryPoliciesStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClientHttpJsonTest { + private static MockHttpService mockService; + private static PrincipalAccessBoundaryPoliciesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPrincipalAccessBoundaryPoliciesStub.getMethodDescriptors(), + PrincipalAccessBoundaryPoliciesSettings.getDefaultEndpoint()); + PrincipalAccessBoundaryPoliciesSettings settings = + PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PrincipalAccessBoundaryPoliciesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PrincipalAccessBoundaryPoliciesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "organizations/organization-9365/locations/location-9365"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PrincipalAccessBoundaryPolicy actualResponse = + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest2() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientTest.java new file mode 100644 index 000000000000..1be322e60b43 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesClientTest.java @@ -0,0 +1,694 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClientTest { + private static MockLocations mockLocations; + private static MockPrincipalAccessBoundaryPolicies mockPrincipalAccessBoundaryPolicies; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PrincipalAccessBoundaryPoliciesClient client; + + @BeforeClass + public static void startStaticServer() { + mockPrincipalAccessBoundaryPolicies = new MockPrincipalAccessBoundaryPolicies(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPrincipalAccessBoundaryPolicies, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PrincipalAccessBoundaryPoliciesSettings settings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PrincipalAccessBoundaryPoliciesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((CreatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals( + principalAccessBoundaryPolicyId, actualRequest.getPrincipalAccessBoundaryPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + String parent = "parent-995424086"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((CreatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals( + principalAccessBoundaryPolicyId, actualRequest.getPrincipalAccessBoundaryPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPrincipalAccessBoundaryPolicyRequest actualRequest = + ((GetPrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPrincipalAccessBoundaryPolicyRequest actualRequest = + ((GetPrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PrincipalAccessBoundaryPolicy actualResponse = + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((UpdatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePrincipalAccessBoundaryPolicyRequest actualRequest = + ((DeletePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePrincipalAccessBoundaryPolicyRequest actualRequest = + ((DeletePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrincipalAccessBoundaryPoliciesRequest actualRequest = + ((ListPrincipalAccessBoundaryPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest2() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrincipalAccessBoundaryPoliciesRequest actualRequest = + ((ListPrincipalAccessBoundaryPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchPrincipalAccessBoundaryPolicyBindingsRequest actualRequest = + ((SearchPrincipalAccessBoundaryPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchPrincipalAccessBoundaryPolicyBindingsRequest actualRequest = + ((SearchPrincipalAccessBoundaryPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocations.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocations.java new file mode 100644 index 000000000000..8d687c2f5f84 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocationsImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocationsImpl.java new file mode 100644 index 000000000000..05c5de977646 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockLocationsImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindings.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindings.java new file mode 100644 index 000000000000..6220de0bdcf9 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindings.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBindings implements MockGrpcService { + private final MockPolicyBindingsImpl serviceImpl; + + public MockPolicyBindings() { + serviceImpl = new MockPolicyBindingsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindingsImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindingsImpl.java new file mode 100644 index 000000000000..91e569ba6958 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPolicyBindingsImpl.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.iam.v3beta.PolicyBindingsGrpc.PolicyBindingsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBindingsImpl extends PolicyBindingsImplBase { + private List requests; + private Queue responses; + + public MockPolicyBindingsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPolicyBinding( + CreatePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicyBinding( + GetPolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyBinding) { + requests.add(request); + responseObserver.onNext(((PolicyBinding) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicyBinding( + UpdatePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicyBinding( + DeletePolicyBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPolicyBindings( + ListPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPolicyBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchTargetPolicyBindings( + SearchTargetPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchTargetPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((SearchTargetPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchTargetPolicyBindings, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + SearchTargetPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPolicies.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..5bae43d6c478 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPrincipalAccessBoundaryPolicies implements MockGrpcService { + private final MockPrincipalAccessBoundaryPoliciesImpl serviceImpl; + + public MockPrincipalAccessBoundaryPolicies() { + serviceImpl = new MockPrincipalAccessBoundaryPoliciesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPoliciesImpl.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPoliciesImpl.java new file mode 100644 index 000000000000..6245421d168e --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/MockPrincipalAccessBoundaryPoliciesImpl.java @@ -0,0 +1,200 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.core.BetaApi; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesGrpc.PrincipalAccessBoundaryPoliciesImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPrincipalAccessBoundaryPoliciesImpl + extends PrincipalAccessBoundaryPoliciesImplBase { + private List requests; + private Queue responses; + + public MockPrincipalAccessBoundaryPoliciesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPrincipalAccessBoundaryPolicy( + CreatePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPrincipalAccessBoundaryPolicy( + GetPrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PrincipalAccessBoundaryPolicy) { + requests.add(request); + responseObserver.onNext(((PrincipalAccessBoundaryPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PrincipalAccessBoundaryPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePrincipalAccessBoundaryPolicy( + UpdatePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePrincipalAccessBoundaryPolicy( + DeletePrincipalAccessBoundaryPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePrincipalAccessBoundaryPolicy," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPrincipalAccessBoundaryPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListPrincipalAccessBoundaryPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPrincipalAccessBoundaryPolicies," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPrincipalAccessBoundaryPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((SearchPrincipalAccessBoundaryPolicyBindingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method" + + " SearchPrincipalAccessBoundaryPolicyBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchPrincipalAccessBoundaryPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientHttpJsonTest.java new file mode 100644 index 000000000000..7f8669b5f398 --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientHttpJsonTest.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v3beta.stub.HttpJsonPolicyBindingsStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyBindingsClientHttpJsonTest { + private static MockHttpService mockService; + private static PolicyBindingsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPolicyBindingsStub.getMethodDescriptors(), + PolicyBindingsSettings.getDefaultEndpoint()); + PolicyBindingsSettings settings = + PolicyBindingsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PolicyBindingsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyBindingsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest3() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPolicyBindingTest4() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPolicyBindingExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PolicyBinding policyBinding = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PolicyBinding actualResponse = client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBinding policyBinding = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePolicyBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4400/locations/location-4400/policyBindings/policyBinding-4400"; + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPolicyBindingsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientTest.java new file mode 100644 index 000000000000..5d1c7fec8dcd --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PolicyBindingsClientTest.java @@ -0,0 +1,985 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse; +import static com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyBindingsClientTest { + private static MockLocations mockLocations; + private static MockPolicyBindings mockPolicyBindings; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PolicyBindingsClient client; + + @BeforeClass + public static void startStaticServer() { + mockPolicyBindings = new MockPolicyBindings(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPolicyBindings, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PolicyBindingsSettings settings = + PolicyBindingsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyBindingsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest3() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPolicyBindingTest4() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + String parent = "parent-995424086"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + + PolicyBinding actualResponse = + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBindingRequest actualRequest = ((CreatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(policyBindingId, actualRequest.getPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBindingExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + client.createPolicyBindingAsync(parent, policyBinding, policyBindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getPolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBindingRequest actualRequest = ((GetPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBindingTest2() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String name = "name3373707"; + + PolicyBinding actualResponse = client.getPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBindingRequest actualRequest = ((GetPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String name = "name3373707"; + client.getPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyBindingTest() throws Exception { + PolicyBinding expectedResponse = + PolicyBinding.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setTarget(PolicyBinding.Target.newBuilder().build()) + .setPolicy("policy-982670030") + .setPolicyUid("policyUid-225689154") + .setCondition(Expr.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PolicyBinding actualResponse = client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePolicyBindingRequest actualRequest = ((UpdatePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(policyBinding, actualRequest.getPolicyBinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePolicyBindingAsync(policyBinding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBindingRequest actualRequest = ((DeletePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePolicyBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBindings.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePolicyBindingAsync(name).get(); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBindingRequest actualRequest = ((DeletePolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + ListPolicyBindingsResponse expectedResponse = + ListPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPolicyBindingsPagedResponse pagedListResponse = client.listPolicyBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBindingsRequest actualRequest = ((ListPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBindingsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest3() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTargetPolicyBindingsTest4() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchTargetPolicyBindingsResponse expectedResponse = + SearchTargetPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPolicyBindings.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String target = "target-880905839"; + + SearchTargetPolicyBindingsPagedResponse pagedListResponse = + client.searchTargetPolicyBindings(parent, target); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTargetPolicyBindingsRequest actualRequest = + ((SearchTargetPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTargetPolicyBindingsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBindings.addException(exception); + + try { + String parent = "parent-995424086"; + String target = "target-880905839"; + client.searchTargetPolicyBindings(parent, target); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java new file mode 100644 index 000000000000..7c8f806e7dcd --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientHttpJsonTest.java @@ -0,0 +1,747 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.iam.v3beta.stub.HttpJsonPrincipalAccessBoundaryPoliciesStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClientHttpJsonTest { + private static MockHttpService mockService; + private static PrincipalAccessBoundaryPoliciesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPrincipalAccessBoundaryPoliciesStub.getMethodDescriptors(), + PrincipalAccessBoundaryPoliciesSettings.getDefaultEndpoint()); + PrincipalAccessBoundaryPoliciesSettings settings = + PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PrincipalAccessBoundaryPoliciesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PrincipalAccessBoundaryPoliciesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "organizations/organization-9365/locations/location-9365"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PrincipalAccessBoundaryPolicy actualResponse = + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest2() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2178/locations/location-2178/principalAccessBoundaryPolicies/principalAccessBoundaryPolicie-2178"; + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientTest.java b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientTest.java new file mode 100644 index 000000000000..5f0ef857e27a --- /dev/null +++ b/java-common-iam/proto-google-iam-v1/src/test/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesClientTest.java @@ -0,0 +1,694 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.ListPrincipalAccessBoundaryPoliciesPagedResponse; +import static com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient.SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPoliciesClientTest { + private static MockLocations mockLocations; + private static MockPrincipalAccessBoundaryPolicies mockPrincipalAccessBoundaryPolicies; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PrincipalAccessBoundaryPoliciesClient client; + + @BeforeClass + public static void startStaticServer() { + mockPrincipalAccessBoundaryPolicies = new MockPrincipalAccessBoundaryPolicies(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPrincipalAccessBoundaryPolicies, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PrincipalAccessBoundaryPoliciesSettings settings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PrincipalAccessBoundaryPoliciesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((CreatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals( + principalAccessBoundaryPolicyId, actualRequest.getPrincipalAccessBoundaryPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + String parent = "parent-995424086"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + + PrincipalAccessBoundaryPolicy actualResponse = + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((CreatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals( + principalAccessBoundaryPolicyId, actualRequest.getPrincipalAccessBoundaryPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + client + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPrincipalAccessBoundaryPolicyRequest actualRequest = + ((GetPrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPrincipalAccessBoundaryPolicyTest2() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + PrincipalAccessBoundaryPolicy actualResponse = client.getPrincipalAccessBoundaryPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPrincipalAccessBoundaryPolicyRequest actualRequest = + ((GetPrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.getPrincipalAccessBoundaryPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePrincipalAccessBoundaryPolicyTest() throws Exception { + PrincipalAccessBoundaryPolicy expectedResponse = + PrincipalAccessBoundaryPolicy.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setUid("uid115792") + .setEtag("etag3123477") + .setDisplayName("displayName1714148973") + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDetails(PrincipalAccessBoundaryPolicyDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PrincipalAccessBoundaryPolicy actualResponse = + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePrincipalAccessBoundaryPolicyRequest actualRequest = + ((UpdatePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals( + principalAccessBoundaryPolicy, actualRequest.getPrincipalAccessBoundaryPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePrincipalAccessBoundaryPolicyRequest actualRequest = + ((DeletePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePrincipalAccessBoundaryPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePrincipalAccessBoundaryPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePrincipalAccessBoundaryPolicyRequest actualRequest = + ((DeletePrincipalAccessBoundaryPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePrincipalAccessBoundaryPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrincipalAccessBoundaryPoliciesRequest actualRequest = + ((ListPrincipalAccessBoundaryPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrincipalAccessBoundaryPoliciesTest2() throws Exception { + PrincipalAccessBoundaryPolicy responsesElement = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + ListPrincipalAccessBoundaryPoliciesResponse expectedResponse = + ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllPrincipalAccessBoundaryPolicies(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPrincipalAccessBoundaryPoliciesPagedResponse pagedListResponse = + client.listPrincipalAccessBoundaryPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getPrincipalAccessBoundaryPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrincipalAccessBoundaryPoliciesRequest actualRequest = + ((ListPrincipalAccessBoundaryPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrincipalAccessBoundaryPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPrincipalAccessBoundaryPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchPrincipalAccessBoundaryPolicyBindingsRequest actualRequest = + ((SearchPrincipalAccessBoundaryPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsTest2() throws Exception { + PolicyBinding responsesElement = PolicyBinding.newBuilder().build(); + SearchPrincipalAccessBoundaryPolicyBindingsResponse expectedResponse = + SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockPrincipalAccessBoundaryPolicies.addResponse(expectedResponse); + + String name = "name3373707"; + + SearchPrincipalAccessBoundaryPolicyBindingsPagedResponse pagedListResponse = + client.searchPrincipalAccessBoundaryPolicyBindings(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockPrincipalAccessBoundaryPolicies.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchPrincipalAccessBoundaryPolicyBindingsRequest actualRequest = + ((SearchPrincipalAccessBoundaryPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchPrincipalAccessBoundaryPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPrincipalAccessBoundaryPolicies.addException(exception); + + try { + String name = "name3373707"; + client.searchPrincipalAccessBoundaryPolicyBindings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/pom.xml b/java-common-iam/proto-proto-google-iam-v1-v1/pom.xml new file mode 100644 index 000000000000..02690360422c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v1 + 1.65.0 + proto-proto-google-iam-v1-v1 + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfig.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfig.java new file mode 100644 index 000000000000..c718ffc2b1f7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfig.java @@ -0,0 +1,1218 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.iam.v1.AuditConfig} + */ +@com.google.protobuf.Generated +public final class AuditConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.AuditConfig) + AuditConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuditConfig"); + } + + // Use AuditConfig.newBuilder() to construct. + private AuditConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuditConfig() { + service_ = ""; + auditLogConfigs_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditConfig.class, com.google.iam.v1.AuditConfig.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + + /** + * + * + *
+   * 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.
+   * 
+ * + * string service = 1; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + + /** + * + * + *
+   * 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.
+   * 
+ * + * string service = 1; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIT_LOG_CONFIGS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List auditLogConfigs_; + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + @java.lang.Override + public java.util.List getAuditLogConfigsList() { + return auditLogConfigs_; + } + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + @java.lang.Override + public java.util.List + getAuditLogConfigsOrBuilderList() { + return auditLogConfigs_; + } + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + @java.lang.Override + public int getAuditLogConfigsCount() { + return auditLogConfigs_.size(); + } + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + @java.lang.Override + public com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index) { + return auditLogConfigs_.get(index); + } + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + @java.lang.Override + public com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index) { + return auditLogConfigs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, service_); + } + for (int i = 0; i < auditLogConfigs_.size(); i++) { + output.writeMessage(3, auditLogConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, service_); + } + for (int i = 0; i < auditLogConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, auditLogConfigs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.AuditConfig)) { + return super.equals(obj); + } + com.google.iam.v1.AuditConfig other = (com.google.iam.v1.AuditConfig) obj; + + if (!getService().equals(other.getService())) return false; + if (!getAuditLogConfigsList().equals(other.getAuditLogConfigsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + if (getAuditLogConfigsCount() > 0) { + hash = (37 * hash) + AUDIT_LOG_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getAuditLogConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.AuditConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfig parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfig parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.AuditConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.iam.v1.AuditConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditConfig) + com.google.iam.v1.AuditConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditConfig.class, com.google.iam.v1.AuditConfig.Builder.class); + } + + // Construct using com.google.iam.v1.AuditConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + if (auditLogConfigsBuilder_ == null) { + auditLogConfigs_ = java.util.Collections.emptyList(); + } else { + auditLogConfigs_ = null; + auditLogConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfig getDefaultInstanceForType() { + return com.google.iam.v1.AuditConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.AuditConfig build() { + com.google.iam.v1.AuditConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfig buildPartial() { + com.google.iam.v1.AuditConfig result = new com.google.iam.v1.AuditConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v1.AuditConfig result) { + if (auditLogConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + auditLogConfigs_ = java.util.Collections.unmodifiableList(auditLogConfigs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.auditLogConfigs_ = auditLogConfigs_; + } else { + result.auditLogConfigs_ = auditLogConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v1.AuditConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.AuditConfig) { + return mergeFrom((com.google.iam.v1.AuditConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.AuditConfig other) { + if (other == com.google.iam.v1.AuditConfig.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (auditLogConfigsBuilder_ == null) { + if (!other.auditLogConfigs_.isEmpty()) { + if (auditLogConfigs_.isEmpty()) { + auditLogConfigs_ = other.auditLogConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.addAll(other.auditLogConfigs_); + } + onChanged(); + } + } else { + if (!other.auditLogConfigs_.isEmpty()) { + if (auditLogConfigsBuilder_.isEmpty()) { + auditLogConfigsBuilder_.dispose(); + auditLogConfigsBuilder_ = null; + auditLogConfigs_ = other.auditLogConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + auditLogConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAuditLogConfigsFieldBuilder() + : null; + } else { + auditLogConfigsBuilder_.addAllMessages(other.auditLogConfigs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + com.google.iam.v1.AuditLogConfig m = + input.readMessage(com.google.iam.v1.AuditLogConfig.parser(), extensionRegistry); + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(m); + } else { + auditLogConfigsBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object service_ = ""; + + /** + * + * + *
+     * 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.
+     * 
+ * + * string service = 1; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * 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.
+     * 
+ * + * string service = 1; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * 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.
+     * 
+ * + * string service = 1; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     * 
+ * + * string service = 1; + * + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     * 
+ * + * string service = 1; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List auditLogConfigs_ = + java.util.Collections.emptyList(); + + private void ensureAuditLogConfigsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + auditLogConfigs_ = + new java.util.ArrayList(auditLogConfigs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditLogConfig, + com.google.iam.v1.AuditLogConfig.Builder, + com.google.iam.v1.AuditLogConfigOrBuilder> + auditLogConfigsBuilder_; + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public java.util.List getAuditLogConfigsList() { + if (auditLogConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(auditLogConfigs_); + } else { + return auditLogConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public int getAuditLogConfigsCount() { + if (auditLogConfigsBuilder_ == null) { + return auditLogConfigs_.size(); + } else { + return auditLogConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index) { + if (auditLogConfigsBuilder_ == null) { + return auditLogConfigs_.get(index); + } else { + return auditLogConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder setAuditLogConfigs(int index, com.google.iam.v1.AuditLogConfig value) { + if (auditLogConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.set(index, value); + onChanged(); + } else { + auditLogConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder setAuditLogConfigs( + int index, com.google.iam.v1.AuditLogConfig.Builder builderForValue) { + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + auditLogConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder addAuditLogConfigs(com.google.iam.v1.AuditLogConfig value) { + if (auditLogConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(value); + onChanged(); + } else { + auditLogConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder addAuditLogConfigs(int index, com.google.iam.v1.AuditLogConfig value) { + if (auditLogConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(index, value); + onChanged(); + } else { + auditLogConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder addAuditLogConfigs(com.google.iam.v1.AuditLogConfig.Builder builderForValue) { + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(builderForValue.build()); + onChanged(); + } else { + auditLogConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder addAuditLogConfigs( + int index, com.google.iam.v1.AuditLogConfig.Builder builderForValue) { + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + auditLogConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder addAllAuditLogConfigs( + java.lang.Iterable values) { + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditLogConfigs_); + onChanged(); + } else { + auditLogConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder clearAuditLogConfigs() { + if (auditLogConfigsBuilder_ == null) { + auditLogConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + auditLogConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public Builder removeAuditLogConfigs(int index) { + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.remove(index); + onChanged(); + } else { + auditLogConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public com.google.iam.v1.AuditLogConfig.Builder getAuditLogConfigsBuilder(int index) { + return internalGetAuditLogConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index) { + if (auditLogConfigsBuilder_ == null) { + return auditLogConfigs_.get(index); + } else { + return auditLogConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public java.util.List + getAuditLogConfigsOrBuilderList() { + if (auditLogConfigsBuilder_ != null) { + return auditLogConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auditLogConfigs_); + } + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public com.google.iam.v1.AuditLogConfig.Builder addAuditLogConfigsBuilder() { + return internalGetAuditLogConfigsFieldBuilder() + .addBuilder(com.google.iam.v1.AuditLogConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public com.google.iam.v1.AuditLogConfig.Builder addAuditLogConfigsBuilder(int index) { + return internalGetAuditLogConfigsFieldBuilder() + .addBuilder(index, com.google.iam.v1.AuditLogConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The configuration for logging of each type of permission.
+     * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + public java.util.List + getAuditLogConfigsBuilderList() { + return internalGetAuditLogConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditLogConfig, + com.google.iam.v1.AuditLogConfig.Builder, + com.google.iam.v1.AuditLogConfigOrBuilder> + internalGetAuditLogConfigsFieldBuilder() { + if (auditLogConfigsBuilder_ == null) { + auditLogConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditLogConfig, + com.google.iam.v1.AuditLogConfig.Builder, + com.google.iam.v1.AuditLogConfigOrBuilder>( + auditLogConfigs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + auditLogConfigs_ = null; + } + return auditLogConfigsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditConfig) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.AuditConfig) + private static final com.google.iam.v1.AuditConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.AuditConfig(); + } + + public static com.google.iam.v1.AuditConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java new file mode 100644 index 000000000000..abe124b93fd6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * One delta entry for AuditConfig. Each individual change (only one
+ * exempted_member in each entry) to a AuditConfig will be a separate entry.
+ * 
+ * + * Protobuf type {@code google.iam.v1.AuditConfigDelta} + */ +@com.google.protobuf.Generated +public final class AuditConfigDelta extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.AuditConfigDelta) + AuditConfigDeltaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuditConfigDelta"); + } + + // Use AuditConfigDelta.newBuilder() to construct. + private AuditConfigDelta(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuditConfigDelta() { + action_ = 0; + service_ = ""; + exemptedMember_ = ""; + logType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfigDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditConfigDelta.class, + com.google.iam.v1.AuditConfigDelta.Builder.class); + } + + /** + * + * + *
+   * The type of action performed on an audit configuration in a policy.
+   * 
+ * + * Protobuf enum {@code google.iam.v1.AuditConfigDelta.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Addition of an audit configuration.
+     * 
+ * + * ADD = 1; + */ + ADD(1), + /** + * + * + *
+     * Removal of an audit configuration.
+     * 
+ * + * REMOVE = 2; + */ + REMOVE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Action"); + } + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Addition of an audit configuration.
+     * 
+ * + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + + /** + * + * + *
+     * Removal of an audit configuration.
+     * 
+ * + * REMOVE = 2; + */ + public static final int REMOVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return ADD; + case 2: + return REMOVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v1.AuditConfigDelta.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v1.AuditConfigDelta.Action) + } + + public static final int ACTION_FIELD_NUMBER = 1; + private int action_ = 0; + + /** + * + * + *
+   * The action that was performed on an audit configuration in a policy.
+   * Required
+   * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * + * + *
+   * The action that was performed on an audit configuration in a policy.
+   * Required
+   * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta.Action getAction() { + com.google.iam.v1.AuditConfigDelta.Action result = + com.google.iam.v1.AuditConfigDelta.Action.forNumber(action_); + return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result; + } + + public static final int SERVICE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + + /** + * + * + *
+   * Specifies a service that was configured for Cloud Audit Logging.
+   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+   * `allServices` is a special value that covers all services.
+   * Required
+   * 
+ * + * string service = 2; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + + /** + * + * + *
+   * Specifies a service that was configured for Cloud Audit Logging.
+   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+   * `allServices` is a special value that covers all services.
+   * Required
+   * 
+ * + * string service = 2; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXEMPTED_MEMBER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object exemptedMember_ = ""; + + /** + * + * + *
+   * A single identity that is exempted from "data access" audit
+   * logging for the `service` specified above.
+   * Follows the same format of Binding.members.
+   * 
+ * + * string exempted_member = 3; + * + * @return The exemptedMember. + */ + @java.lang.Override + public java.lang.String getExemptedMember() { + java.lang.Object ref = exemptedMember_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exemptedMember_ = s; + return s; + } + } + + /** + * + * + *
+   * A single identity that is exempted from "data access" audit
+   * logging for the `service` specified above.
+   * Follows the same format of Binding.members.
+   * 
+ * + * string exempted_member = 3; + * + * @return The bytes for exemptedMember. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExemptedMemberBytes() { + java.lang.Object ref = exemptedMember_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exemptedMember_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOG_TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object logType_ = ""; + + /** + * + * + *
+   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+   * enabled, and cannot be configured.
+   * Required
+   * 
+ * + * string log_type = 4; + * + * @return The logType. + */ + @java.lang.Override + public java.lang.String getLogType() { + java.lang.Object ref = logType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logType_ = s; + return s; + } + } + + /** + * + * + *
+   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+   * enabled, and cannot be configured.
+   * Required
+   * 
+ * + * string log_type = 4; + * + * @return The bytes for logType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogTypeBytes() { + java.lang.Object ref = logType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(1, action_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, service_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exemptedMember_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, exemptedMember_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, logType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, service_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exemptedMember_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, exemptedMember_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, logType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.AuditConfigDelta)) { + return super.equals(obj); + } + com.google.iam.v1.AuditConfigDelta other = (com.google.iam.v1.AuditConfigDelta) obj; + + if (action_ != other.action_) return false; + if (!getService().equals(other.getService())) return false; + if (!getExemptedMember().equals(other.getExemptedMember())) return false; + if (!getLogType().equals(other.getLogType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + EXEMPTED_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getExemptedMember().hashCode(); + hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getLogType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditConfigDelta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.AuditConfigDelta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * One delta entry for AuditConfig. Each individual change (only one
+   * exempted_member in each entry) to a AuditConfig will be a separate entry.
+   * 
+ * + * Protobuf type {@code google.iam.v1.AuditConfigDelta} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditConfigDelta) + com.google.iam.v1.AuditConfigDeltaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfigDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditConfigDelta.class, + com.google.iam.v1.AuditConfigDelta.Builder.class); + } + + // Construct using com.google.iam.v1.AuditConfigDelta.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + action_ = 0; + service_ = ""; + exemptedMember_ = ""; + logType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditConfigDelta_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() { + return com.google.iam.v1.AuditConfigDelta.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta build() { + com.google.iam.v1.AuditConfigDelta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta buildPartial() { + com.google.iam.v1.AuditConfigDelta result = new com.google.iam.v1.AuditConfigDelta(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.AuditConfigDelta result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.exemptedMember_ = exemptedMember_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.logType_ = logType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.AuditConfigDelta) { + return mergeFrom((com.google.iam.v1.AuditConfigDelta) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.AuditConfigDelta other) { + if (other == com.google.iam.v1.AuditConfigDelta.getDefaultInstance()) return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getExemptedMember().isEmpty()) { + exemptedMember_ = other.exemptedMember_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLogType().isEmpty()) { + logType_ = other.logType_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + exemptedMember_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + logType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int action_ = 0; + + /** + * + * + *
+     * The action that was performed on an audit configuration in a policy.
+     * Required
+     * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * + * + *
+     * The action that was performed on an audit configuration in a policy.
+     * Required
+     * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The action that was performed on an audit configuration in a policy.
+     * Required
+     * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta.Action getAction() { + com.google.iam.v1.AuditConfigDelta.Action result = + com.google.iam.v1.AuditConfigDelta.Action.forNumber(action_); + return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The action that was performed on an audit configuration in a policy.
+     * Required
+     * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.iam.v1.AuditConfigDelta.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The action that was performed on an audit configuration in a policy.
+     * Required
+     * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + + /** + * + * + *
+     * Specifies a service that was configured for Cloud Audit Logging.
+     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+     * `allServices` is a special value that covers all services.
+     * Required
+     * 
+ * + * string service = 2; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Specifies a service that was configured for Cloud Audit Logging.
+     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+     * `allServices` is a special value that covers all services.
+     * Required
+     * 
+ * + * string service = 2; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Specifies a service that was configured for Cloud Audit Logging.
+     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+     * `allServices` is a special value that covers all services.
+     * Required
+     * 
+ * + * string service = 2; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies a service that was configured for Cloud Audit Logging.
+     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+     * `allServices` is a special value that covers all services.
+     * Required
+     * 
+ * + * string service = 2; + * + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies a service that was configured for Cloud Audit Logging.
+     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+     * `allServices` is a special value that covers all services.
+     * Required
+     * 
+ * + * string service = 2; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object exemptedMember_ = ""; + + /** + * + * + *
+     * A single identity that is exempted from "data access" audit
+     * logging for the `service` specified above.
+     * Follows the same format of Binding.members.
+     * 
+ * + * string exempted_member = 3; + * + * @return The exemptedMember. + */ + public java.lang.String getExemptedMember() { + java.lang.Object ref = exemptedMember_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exemptedMember_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A single identity that is exempted from "data access" audit
+     * logging for the `service` specified above.
+     * Follows the same format of Binding.members.
+     * 
+ * + * string exempted_member = 3; + * + * @return The bytes for exemptedMember. + */ + public com.google.protobuf.ByteString getExemptedMemberBytes() { + java.lang.Object ref = exemptedMember_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exemptedMember_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A single identity that is exempted from "data access" audit
+     * logging for the `service` specified above.
+     * Follows the same format of Binding.members.
+     * 
+ * + * string exempted_member = 3; + * + * @param value The exemptedMember to set. + * @return This builder for chaining. + */ + public Builder setExemptedMember(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exemptedMember_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A single identity that is exempted from "data access" audit
+     * logging for the `service` specified above.
+     * Follows the same format of Binding.members.
+     * 
+ * + * string exempted_member = 3; + * + * @return This builder for chaining. + */ + public Builder clearExemptedMember() { + exemptedMember_ = getDefaultInstance().getExemptedMember(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A single identity that is exempted from "data access" audit
+     * logging for the `service` specified above.
+     * Follows the same format of Binding.members.
+     * 
+ * + * string exempted_member = 3; + * + * @param value The bytes for exemptedMember to set. + * @return This builder for chaining. + */ + public Builder setExemptedMemberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exemptedMember_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object logType_ = ""; + + /** + * + * + *
+     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+     * enabled, and cannot be configured.
+     * Required
+     * 
+ * + * string log_type = 4; + * + * @return The logType. + */ + public java.lang.String getLogType() { + java.lang.Object ref = logType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+     * enabled, and cannot be configured.
+     * Required
+     * 
+ * + * string log_type = 4; + * + * @return The bytes for logType. + */ + public com.google.protobuf.ByteString getLogTypeBytes() { + java.lang.Object ref = logType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+     * enabled, and cannot be configured.
+     * Required
+     * 
+ * + * string log_type = 4; + * + * @param value The logType to set. + * @return This builder for chaining. + */ + public Builder setLogType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+     * enabled, and cannot be configured.
+     * Required
+     * 
+ * + * string log_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearLogType() { + logType_ = getDefaultInstance().getLogType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+     * enabled, and cannot be configured.
+     * Required
+     * 
+ * + * string log_type = 4; + * + * @param value The bytes for logType to set. + * @return This builder for chaining. + */ + public Builder setLogTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditConfigDelta) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.AuditConfigDelta) + private static final com.google.iam.v1.AuditConfigDelta DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.AuditConfigDelta(); + } + + public static com.google.iam.v1.AuditConfigDelta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditConfigDelta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java new file mode 100644 index 000000000000..5f6cb03c5caf --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface AuditConfigDeltaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditConfigDelta) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The action that was performed on an audit configuration in a policy.
+   * Required
+   * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * + * + *
+   * The action that was performed on an audit configuration in a policy.
+   * Required
+   * 
+ * + * .google.iam.v1.AuditConfigDelta.Action action = 1; + * + * @return The action. + */ + com.google.iam.v1.AuditConfigDelta.Action getAction(); + + /** + * + * + *
+   * Specifies a service that was configured for Cloud Audit Logging.
+   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+   * `allServices` is a special value that covers all services.
+   * Required
+   * 
+ * + * string service = 2; + * + * @return The service. + */ + java.lang.String getService(); + + /** + * + * + *
+   * Specifies a service that was configured for Cloud Audit Logging.
+   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+   * `allServices` is a special value that covers all services.
+   * Required
+   * 
+ * + * string service = 2; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + + /** + * + * + *
+   * A single identity that is exempted from "data access" audit
+   * logging for the `service` specified above.
+   * Follows the same format of Binding.members.
+   * 
+ * + * string exempted_member = 3; + * + * @return The exemptedMember. + */ + java.lang.String getExemptedMember(); + + /** + * + * + *
+   * A single identity that is exempted from "data access" audit
+   * logging for the `service` specified above.
+   * Follows the same format of Binding.members.
+   * 
+ * + * string exempted_member = 3; + * + * @return The bytes for exemptedMember. + */ + com.google.protobuf.ByteString getExemptedMemberBytes(); + + /** + * + * + *
+   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+   * enabled, and cannot be configured.
+   * Required
+   * 
+ * + * string log_type = 4; + * + * @return The logType. + */ + java.lang.String getLogType(); + + /** + * + * + *
+   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+   * enabled, and cannot be configured.
+   * Required
+   * 
+ * + * string log_type = 4; + * + * @return The bytes for logType. + */ + com.google.protobuf.ByteString getLogTypeBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java new file mode 100644 index 000000000000..57e9bc6de2bd --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface AuditConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.
+   * 
+ * + * string service = 1; + * + * @return The service. + */ + java.lang.String getService(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * string service = 1; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + java.util.List getAuditLogConfigsList(); + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index); + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + int getAuditLogConfigsCount(); + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + java.util.List + getAuditLogConfigsOrBuilderList(); + + /** + * + * + *
+   * The configuration for logging of each type of permission.
+   * 
+ * + * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; + */ + com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java new file mode 100644 index 000000000000..223226418f53 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java @@ -0,0 +1,1112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.iam.v1.AuditLogConfig} + */ +@com.google.protobuf.Generated +public final class AuditLogConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.AuditLogConfig) + AuditLogConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuditLogConfig"); + } + + // Use AuditLogConfig.newBuilder() to construct. + private AuditLogConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuditLogConfig() { + logType_ = 0; + exemptedMembers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditLogConfig.class, com.google.iam.v1.AuditLogConfig.Builder.class); + } + + /** + * + * + *
+   * The list of valid permission types for which logging can be configured.
+   * Admin writes are always logged, and are not configurable.
+   * 
+ * + * Protobuf enum {@code google.iam.v1.AuditLogConfig.LogType} + */ + public enum LogType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default case. Should never be this.
+     * 
+ * + * LOG_TYPE_UNSPECIFIED = 0; + */ + LOG_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Admin reads. Example: CloudIAM getIamPolicy
+     * 
+ * + * ADMIN_READ = 1; + */ + ADMIN_READ(1), + /** + * + * + *
+     * Data writes. Example: CloudSQL Users create
+     * 
+ * + * DATA_WRITE = 2; + */ + DATA_WRITE(2), + /** + * + * + *
+     * Data reads. Example: CloudSQL Users list
+     * 
+ * + * DATA_READ = 3; + */ + DATA_READ(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogType"); + } + + /** + * + * + *
+     * Default case. Should never be this.
+     * 
+ * + * LOG_TYPE_UNSPECIFIED = 0; + */ + public static final int LOG_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Admin reads. Example: CloudIAM getIamPolicy
+     * 
+ * + * ADMIN_READ = 1; + */ + public static final int ADMIN_READ_VALUE = 1; + + /** + * + * + *
+     * Data writes. Example: CloudSQL Users create
+     * 
+ * + * DATA_WRITE = 2; + */ + public static final int DATA_WRITE_VALUE = 2; + + /** + * + * + *
+     * Data reads. Example: CloudSQL Users list
+     * 
+ * + * DATA_READ = 3; + */ + public static final int DATA_READ_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LogType forNumber(int value) { + switch (value) { + case 0: + return LOG_TYPE_UNSPECIFIED; + case 1: + return ADMIN_READ; + case 2: + return DATA_WRITE; + case 3: + return DATA_READ; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LogType findValueByNumber(int number) { + return LogType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v1.AuditLogConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final LogType[] VALUES = values(); + + public static LogType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LogType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v1.AuditLogConfig.LogType) + } + + public static final int LOG_TYPE_FIELD_NUMBER = 1; + private int logType_ = 0; + + /** + * + * + *
+   * The log type that this config enables.
+   * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The enum numeric value on the wire for logType. + */ + @java.lang.Override + public int getLogTypeValue() { + return logType_; + } + + /** + * + * + *
+   * The log type that this config enables.
+   * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The logType. + */ + @java.lang.Override + public com.google.iam.v1.AuditLogConfig.LogType getLogType() { + com.google.iam.v1.AuditLogConfig.LogType result = + com.google.iam.v1.AuditLogConfig.LogType.forNumber(logType_); + return result == null ? com.google.iam.v1.AuditLogConfig.LogType.UNRECOGNIZED : result; + } + + public static final int EXEMPTED_MEMBERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList exemptedMembers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @return A list containing the exemptedMembers. + */ + public com.google.protobuf.ProtocolStringList getExemptedMembersList() { + return exemptedMembers_; + } + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @return The count of exemptedMembers. + */ + public int getExemptedMembersCount() { + return exemptedMembers_.size(); + } + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the element to return. + * @return The exemptedMembers at the given index. + */ + public java.lang.String getExemptedMembers(int index) { + return exemptedMembers_.get(index); + } + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exemptedMembers at the given index. + */ + public com.google.protobuf.ByteString getExemptedMembersBytes(int index) { + return exemptedMembers_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (logType_ != com.google.iam.v1.AuditLogConfig.LogType.LOG_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logType_); + } + for (int i = 0; i < exemptedMembers_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, exemptedMembers_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logType_ != com.google.iam.v1.AuditLogConfig.LogType.LOG_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, logType_); + } + { + int dataSize = 0; + for (int i = 0; i < exemptedMembers_.size(); i++) { + dataSize += computeStringSizeNoTag(exemptedMembers_.getRaw(i)); + } + size += dataSize; + size += 1 * getExemptedMembersList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.AuditLogConfig)) { + return super.equals(obj); + } + com.google.iam.v1.AuditLogConfig other = (com.google.iam.v1.AuditLogConfig) obj; + + if (logType_ != other.logType_) return false; + if (!getExemptedMembersList().equals(other.getExemptedMembersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; + hash = (53 * hash) + logType_; + if (getExemptedMembersCount() > 0) { + hash = (37 * hash) + EXEMPTED_MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getExemptedMembersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.AuditLogConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditLogConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditLogConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.AuditLogConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.AuditLogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.iam.v1.AuditLogConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditLogConfig) + com.google.iam.v1.AuditLogConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.AuditLogConfig.class, + com.google.iam.v1.AuditLogConfig.Builder.class); + } + + // Construct using com.google.iam.v1.AuditLogConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + logType_ = 0; + exemptedMembers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.AuditLogConfig getDefaultInstanceForType() { + return com.google.iam.v1.AuditLogConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.AuditLogConfig build() { + com.google.iam.v1.AuditLogConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.AuditLogConfig buildPartial() { + com.google.iam.v1.AuditLogConfig result = new com.google.iam.v1.AuditLogConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.AuditLogConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.logType_ = logType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + exemptedMembers_.makeImmutable(); + result.exemptedMembers_ = exemptedMembers_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.AuditLogConfig) { + return mergeFrom((com.google.iam.v1.AuditLogConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.AuditLogConfig other) { + if (other == com.google.iam.v1.AuditLogConfig.getDefaultInstance()) return this; + if (other.logType_ != 0) { + setLogTypeValue(other.getLogTypeValue()); + } + if (!other.exemptedMembers_.isEmpty()) { + if (exemptedMembers_.isEmpty()) { + exemptedMembers_ = other.exemptedMembers_; + bitField0_ |= 0x00000002; + } else { + ensureExemptedMembersIsMutable(); + exemptedMembers_.addAll(other.exemptedMembers_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + logType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExemptedMembersIsMutable(); + exemptedMembers_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int logType_ = 0; + + /** + * + * + *
+     * The log type that this config enables.
+     * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The enum numeric value on the wire for logType. + */ + @java.lang.Override + public int getLogTypeValue() { + return logType_; + } + + /** + * + * + *
+     * The log type that this config enables.
+     * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @param value The enum numeric value on the wire for logType to set. + * @return This builder for chaining. + */ + public Builder setLogTypeValue(int value) { + logType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The log type that this config enables.
+     * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The logType. + */ + @java.lang.Override + public com.google.iam.v1.AuditLogConfig.LogType getLogType() { + com.google.iam.v1.AuditLogConfig.LogType result = + com.google.iam.v1.AuditLogConfig.LogType.forNumber(logType_); + return result == null ? com.google.iam.v1.AuditLogConfig.LogType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The log type that this config enables.
+     * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @param value The logType to set. + * @return This builder for chaining. + */ + public Builder setLogType(com.google.iam.v1.AuditLogConfig.LogType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + logType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The log type that this config enables.
+     * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearLogType() { + bitField0_ = (bitField0_ & ~0x00000001); + logType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList exemptedMembers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExemptedMembersIsMutable() { + if (!exemptedMembers_.isModifiable()) { + exemptedMembers_ = new com.google.protobuf.LazyStringArrayList(exemptedMembers_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @return A list containing the exemptedMembers. + */ + public com.google.protobuf.ProtocolStringList getExemptedMembersList() { + exemptedMembers_.makeImmutable(); + return exemptedMembers_; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @return The count of exemptedMembers. + */ + public int getExemptedMembersCount() { + return exemptedMembers_.size(); + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the element to return. + * @return The exemptedMembers at the given index. + */ + public java.lang.String getExemptedMembers(int index) { + return exemptedMembers_.get(index); + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exemptedMembers at the given index. + */ + public com.google.protobuf.ByteString getExemptedMembersBytes(int index) { + return exemptedMembers_.getByteString(index); + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index to set the value at. + * @param value The exemptedMembers to set. + * @return This builder for chaining. + */ + public Builder setExemptedMembers(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExemptedMembersIsMutable(); + exemptedMembers_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param value The exemptedMembers to add. + * @return This builder for chaining. + */ + public Builder addExemptedMembers(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExemptedMembersIsMutable(); + exemptedMembers_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param values The exemptedMembers to add. + * @return This builder for chaining. + */ + public Builder addAllExemptedMembers(java.lang.Iterable values) { + ensureExemptedMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exemptedMembers_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @return This builder for chaining. + */ + public Builder clearExemptedMembers() { + exemptedMembers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the identities that do not cause logging for this type of
+     * permission.
+     * Follows the same format of
+     * [Binding.members][google.iam.v1.Binding.members].
+     * 
+ * + * repeated string exempted_members = 2; + * + * @param value The bytes of the exemptedMembers to add. + * @return This builder for chaining. + */ + public Builder addExemptedMembersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExemptedMembersIsMutable(); + exemptedMembers_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditLogConfig) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.AuditLogConfig) + private static final com.google.iam.v1.AuditLogConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.AuditLogConfig(); + } + + public static com.google.iam.v1.AuditLogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditLogConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.AuditLogConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java new file mode 100644 index 000000000000..d5d4600b5fff --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface AuditLogConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditLogConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The log type that this config enables.
+   * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The enum numeric value on the wire for logType. + */ + int getLogTypeValue(); + + /** + * + * + *
+   * The log type that this config enables.
+   * 
+ * + * .google.iam.v1.AuditLogConfig.LogType log_type = 1; + * + * @return The logType. + */ + com.google.iam.v1.AuditLogConfig.LogType getLogType(); + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @return A list containing the exemptedMembers. + */ + java.util.List getExemptedMembersList(); + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @return The count of exemptedMembers. + */ + int getExemptedMembersCount(); + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the element to return. + * @return The exemptedMembers at the given index. + */ + java.lang.String getExemptedMembers(int index); + + /** + * + * + *
+   * Specifies the identities that do not cause logging for this type of
+   * permission.
+   * Follows the same format of
+   * [Binding.members][google.iam.v1.Binding.members].
+   * 
+ * + * repeated string exempted_members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exemptedMembers at the given index. + */ + com.google.protobuf.ByteString getExemptedMembersBytes(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Binding.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Binding.java new file mode 100644 index 000000000000..ff2b72822420 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Binding.java @@ -0,0 +1,1825 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Associates `members`, or principals, with a `role`.
+ * 
+ * + * Protobuf type {@code google.iam.v1.Binding} + */ +@com.google.protobuf.Generated +public final class Binding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.Binding) + BindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Binding"); + } + + // Use Binding.newBuilder() to construct. + private Binding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Binding() { + role_ = ""; + members_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.Binding.class, com.google.iam.v1.Binding.Builder.class); + } + + private int bitField0_; + public static final int ROLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object role_ = ""; + + /** + * + * + *
+   * Role that is assigned to the list of `members`, or principals.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * 
+ * + * string role = 1; + * + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } + } + + /** + * + * + *
+   * Role that is assigned to the list of `members`, or principals.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList getMembersList() { + return members_; + } + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString getMembersBytes(int index) { + return members_.getByteString(index); + } + + public static final int CONDITION_FIELD_NUMBER = 3; + private com.google.type.Expr condition_; + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + * + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, role_); + } + for (int i = 0; i < members_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, members_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCondition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, role_); + } + { + int dataSize = 0; + for (int i = 0; i < members_.size(); i++) { + dataSize += computeStringSizeNoTag(members_.getRaw(i)); + } + size += dataSize; + size += 1 * getMembersList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCondition()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.Binding)) { + return super.equals(obj); + } + com.google.iam.v1.Binding other = (com.google.iam.v1.Binding) obj; + + if (!getRole().equals(other.getRole())) return false; + if (!getMembersList().equals(other.getMembersList())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + if (getMembersCount() > 0) { + hash = (37 * hash) + MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getMembersList().hashCode(); + } + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.Binding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Binding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Binding parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Binding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Binding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Binding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Binding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Binding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.Binding parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Binding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.Binding parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Binding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.Binding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Associates `members`, or principals, with a `role`.
+   * 
+ * + * Protobuf type {@code google.iam.v1.Binding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.Binding) + com.google.iam.v1.BindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.Binding.class, com.google.iam.v1.Binding.Builder.class); + } + + // Construct using com.google.iam.v1.Binding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + role_ = ""; + members_ = com.google.protobuf.LazyStringArrayList.emptyList(); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.Binding getDefaultInstanceForType() { + return com.google.iam.v1.Binding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.Binding build() { + com.google.iam.v1.Binding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.Binding buildPartial() { + com.google.iam.v1.Binding result = new com.google.iam.v1.Binding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.Binding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.role_ = role_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + members_.makeImmutable(); + result.members_ = members_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.Binding) { + return mergeFrom((com.google.iam.v1.Binding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.Binding other) { + if (other == com.google.iam.v1.Binding.getDefaultInstance()) return this; + if (!other.getRole().isEmpty()) { + role_ = other.role_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.members_.isEmpty()) { + if (members_.isEmpty()) { + members_ = other.members_; + bitField0_ |= 0x00000002; + } else { + ensureMembersIsMutable(); + members_.addAll(other.members_); + } + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMembersIsMutable(); + members_.add(s); + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object role_ = ""; + + /** + * + * + *
+     * Role that is assigned to the list of `members`, or principals.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * 
+ * + * string role = 1; + * + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Role that is assigned to the list of `members`, or principals.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Role that is assigned to the list of `members`, or principals.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * 
+ * + * string role = 1; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + role_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Role that is assigned to the list of `members`, or principals.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * 
+ * + * string role = 1; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + role_ = getDefaultInstance().getRole(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Role that is assigned to the list of `members`, or principals.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * 
+ * + * string role = 1; + * + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + role_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMembersIsMutable() { + if (!members_.isModifiable()) { + members_ = new com.google.protobuf.LazyStringArrayList(members_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList getMembersList() { + members_.makeImmutable(); + return members_; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString getMembersBytes(int index) { + return members_.getByteString(index); + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param index The index to set the value at. + * @param value The members to set. + * @return This builder for chaining. + */ + public Builder setMembers(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersIsMutable(); + members_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param value The members to add. + * @return This builder for chaining. + */ + public Builder addMembers(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param values The members to add. + * @return This builder for chaining. + */ + public Builder addAllMembers(java.lang.Iterable values) { + ensureMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, members_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @return This builder for chaining. + */ + public Builder clearMembers() { + members_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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.
+     *
+     * * `user:{emailid}`: An email address that represents a specific Google
+     * account. For example, `alice@example.com` .
+     *
+     *
+     * * `serviceAccount:{emailid}`: An email address that represents a service
+     * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+     *
+     * * `group:{emailid}`: An email address that represents a Google group.
+     * For example, `admins@example.com`.
+     *
+     * * `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.
+     *
+     *
+     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+     * users of that domain. For example, `google.com` or `example.com`.
+     * 
+ * + * repeated string members = 2; + * + * @param value The bytes of the members to add. + * @return This builder for chaining. + */ + public Builder addMembersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + conditionBuilder_; + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + * + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public Builder setCondition(com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && condition_ != null + && condition_ != com.google.type.Expr.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + if (condition_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000004); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     *
+     * If the condition evaluates to `true`, then this binding applies to the
+     * current request.
+     *
+     * If the condition evaluates to `false`, then this binding does not apply to
+     * the current request. However, a different role binding might grant the same
+     * role to one or more of the principals in this binding.
+     *
+     * To learn which resources support conditions in their IAM policies, see the
+     * [IAM
+     * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+     * 
+ * + * .google.type.Expr condition = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.Binding) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.Binding) + private static final com.google.iam.v1.Binding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.Binding(); + } + + public static com.google.iam.v1.Binding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Binding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.Binding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDelta.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDelta.java new file mode 100644 index 000000000000..bebfd498a77c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDelta.java @@ -0,0 +1,1415 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * One delta entry for Binding. Each individual change (only one member in each
+ * entry) to a binding will be a separate entry.
+ * 
+ * + * Protobuf type {@code google.iam.v1.BindingDelta} + */ +@com.google.protobuf.Generated +public final class BindingDelta extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.BindingDelta) + BindingDeltaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BindingDelta"); + } + + // Use BindingDelta.newBuilder() to construct. + private BindingDelta(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BindingDelta() { + action_ = 0; + role_ = ""; + member_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_BindingDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.BindingDelta.class, com.google.iam.v1.BindingDelta.Builder.class); + } + + /** + * + * + *
+   * The type of action performed on a Binding in a policy.
+   * 
+ * + * Protobuf enum {@code google.iam.v1.BindingDelta.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Addition of a Binding.
+     * 
+ * + * ADD = 1; + */ + ADD(1), + /** + * + * + *
+     * Removal of a Binding.
+     * 
+ * + * REMOVE = 2; + */ + REMOVE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Action"); + } + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Addition of a Binding.
+     * 
+ * + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + + /** + * + * + *
+     * Removal of a Binding.
+     * 
+ * + * REMOVE = 2; + */ + public static final int REMOVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return ADD; + case 2: + return REMOVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v1.BindingDelta.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v1.BindingDelta.Action) + } + + private int bitField0_; + public static final int ACTION_FIELD_NUMBER = 1; + private int action_ = 0; + + /** + * + * + *
+   * The action that was performed on a Binding.
+   * Required
+   * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * + * + *
+   * The action that was performed on a Binding.
+   * Required
+   * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.iam.v1.BindingDelta.Action getAction() { + com.google.iam.v1.BindingDelta.Action result = + com.google.iam.v1.BindingDelta.Action.forNumber(action_); + return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result; + } + + public static final int ROLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object role_ = ""; + + /** + * + * + *
+   * Role that is assigned to `members`.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * Required
+   * 
+ * + * string role = 2; + * + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } + } + + /** + * + * + *
+   * Role that is assigned to `members`.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * Required
+   * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object member_ = ""; + + /** + * + * + *
+   * A single identity requesting access for a Google Cloud resource.
+   * Follows the same format of Binding.members.
+   * Required
+   * 
+ * + * string member = 3; + * + * @return The member. + */ + @java.lang.Override + public java.lang.String getMember() { + java.lang.Object ref = member_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + member_ = s; + return s; + } + } + + /** + * + * + *
+   * A single identity requesting access for a Google Cloud resource.
+   * Follows the same format of Binding.members.
+   * Required
+   * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMemberBytes() { + java.lang.Object ref = member_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + member_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 4; + private com.google.type.Expr condition_; + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + * + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != com.google.iam.v1.BindingDelta.Action.ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(1, action_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, role_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(member_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, member_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCondition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (action_ != com.google.iam.v1.BindingDelta.Action.ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, role_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(member_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, member_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCondition()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.BindingDelta)) { + return super.equals(obj); + } + com.google.iam.v1.BindingDelta other = (com.google.iam.v1.BindingDelta) obj; + + if (action_ != other.action_) return false; + if (!getRole().equals(other.getRole())) return false; + if (!getMember().equals(other.getMember())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + hash = (37 * hash) + MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getMember().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.BindingDelta parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.BindingDelta parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.BindingDelta parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.BindingDelta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.BindingDelta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.BindingDelta parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.BindingDelta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.BindingDelta parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.BindingDelta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.BindingDelta parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.BindingDelta parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.BindingDelta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.BindingDelta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * One delta entry for Binding. Each individual change (only one member in each
+   * entry) to a binding will be a separate entry.
+   * 
+ * + * Protobuf type {@code google.iam.v1.BindingDelta} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.BindingDelta) + com.google.iam.v1.BindingDeltaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_BindingDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.BindingDelta.class, com.google.iam.v1.BindingDelta.Builder.class); + } + + // Construct using com.google.iam.v1.BindingDelta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + action_ = 0; + role_ = ""; + member_ = ""; + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.BindingDelta getDefaultInstanceForType() { + return com.google.iam.v1.BindingDelta.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.BindingDelta build() { + com.google.iam.v1.BindingDelta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.BindingDelta buildPartial() { + com.google.iam.v1.BindingDelta result = new com.google.iam.v1.BindingDelta(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.BindingDelta result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.role_ = role_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.member_ = member_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.BindingDelta) { + return mergeFrom((com.google.iam.v1.BindingDelta) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.BindingDelta other) { + if (other == com.google.iam.v1.BindingDelta.getDefaultInstance()) return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getRole().isEmpty()) { + role_ = other.role_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMember().isEmpty()) { + member_ = other.member_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + member_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int action_ = 0; + + /** + * + * + *
+     * The action that was performed on a Binding.
+     * Required
+     * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * + * + *
+     * The action that was performed on a Binding.
+     * Required
+     * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The action that was performed on a Binding.
+     * Required
+     * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.iam.v1.BindingDelta.Action getAction() { + com.google.iam.v1.BindingDelta.Action result = + com.google.iam.v1.BindingDelta.Action.forNumber(action_); + return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The action that was performed on a Binding.
+     * Required
+     * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.iam.v1.BindingDelta.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The action that was performed on a Binding.
+     * Required
+     * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object role_ = ""; + + /** + * + * + *
+     * Role that is assigned to `members`.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * Required
+     * 
+ * + * string role = 2; + * + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Role that is assigned to `members`.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * Required
+     * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Role that is assigned to `members`.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * Required
+     * 
+ * + * string role = 2; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + role_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Role that is assigned to `members`.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * Required
+     * 
+ * + * string role = 2; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + role_ = getDefaultInstance().getRole(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Role that is assigned to `members`.
+     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+     * Required
+     * 
+ * + * string role = 2; + * + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + role_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object member_ = ""; + + /** + * + * + *
+     * A single identity requesting access for a Google Cloud resource.
+     * Follows the same format of Binding.members.
+     * Required
+     * 
+ * + * string member = 3; + * + * @return The member. + */ + public java.lang.String getMember() { + java.lang.Object ref = member_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + member_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A single identity requesting access for a Google Cloud resource.
+     * Follows the same format of Binding.members.
+     * Required
+     * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + public com.google.protobuf.ByteString getMemberBytes() { + java.lang.Object ref = member_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + member_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A single identity requesting access for a Google Cloud resource.
+     * Follows the same format of Binding.members.
+     * Required
+     * 
+ * + * string member = 3; + * + * @param value The member to set. + * @return This builder for chaining. + */ + public Builder setMember(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + member_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A single identity requesting access for a Google Cloud resource.
+     * Follows the same format of Binding.members.
+     * Required
+     * 
+ * + * string member = 3; + * + * @return This builder for chaining. + */ + public Builder clearMember() { + member_ = getDefaultInstance().getMember(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A single identity requesting access for a Google Cloud resource.
+     * Follows the same format of Binding.members.
+     * Required
+     * 
+ * + * string member = 3; + * + * @param value The bytes for member to set. + * @return This builder for chaining. + */ + public Builder setMemberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + member_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + conditionBuilder_; + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + * + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public Builder setCondition(com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && condition_ != null + && condition_ != com.google.type.Expr.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + if (condition_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000008); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + } + + /** + * + * + *
+     * The condition that is associated with this binding.
+     * 
+ * + * .google.type.Expr condition = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.BindingDelta) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.BindingDelta) + private static final com.google.iam.v1.BindingDelta DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.BindingDelta(); + } + + public static com.google.iam.v1.BindingDelta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BindingDelta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.BindingDelta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java new file mode 100644 index 000000000000..efcf8cb6ef54 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface BindingDeltaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.BindingDelta) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The action that was performed on a Binding.
+   * Required
+   * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * + * + *
+   * The action that was performed on a Binding.
+   * Required
+   * 
+ * + * .google.iam.v1.BindingDelta.Action action = 1; + * + * @return The action. + */ + com.google.iam.v1.BindingDelta.Action getAction(); + + /** + * + * + *
+   * Role that is assigned to `members`.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * Required
+   * 
+ * + * string role = 2; + * + * @return The role. + */ + java.lang.String getRole(); + + /** + * + * + *
+   * Role that is assigned to `members`.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * Required
+   * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + com.google.protobuf.ByteString getRoleBytes(); + + /** + * + * + *
+   * A single identity requesting access for a Google Cloud resource.
+   * Follows the same format of Binding.members.
+   * Required
+   * 
+ * + * string member = 3; + * + * @return The member. + */ + java.lang.String getMember(); + + /** + * + * + *
+   * A single identity requesting access for a Google Cloud resource.
+   * Follows the same format of Binding.members.
+   * Required
+   * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + com.google.protobuf.ByteString getMemberBytes(); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + * + * @return The condition. + */ + com.google.type.Expr getCondition(); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   * 
+ * + * .google.type.Expr condition = 4; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java new file mode 100644 index 000000000000..d4440a91b373 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java @@ -0,0 +1,344 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface BindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.Binding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Role that is assigned to the list of `members`, or principals.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * 
+ * + * string role = 1; + * + * @return The role. + */ + java.lang.String getRole(); + + /** + * + * + *
+   * Role that is assigned to the list of `members`, or principals.
+   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+   * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + com.google.protobuf.ByteString getRoleBytes(); + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @return A list containing the members. + */ + java.util.List getMembersList(); + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @return The count of members. + */ + int getMembersCount(); + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @param index The index of the element to return. + * @return The members at the given index. + */ + java.lang.String getMembers(int index); + + /** + * + * + *
+   * 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.
+   *
+   * * `user:{emailid}`: An email address that represents a specific Google
+   * account. For example, `alice@example.com` .
+   *
+   *
+   * * `serviceAccount:{emailid}`: An email address that represents a service
+   * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+   *
+   * * `group:{emailid}`: An email address that represents a Google group.
+   * For example, `admins@example.com`.
+   *
+   * * `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.
+   *
+   *
+   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+   * users of that domain. For example, `google.com` or `example.com`.
+   * 
+ * + * repeated string members = 2; + * + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + com.google.protobuf.ByteString getMembersBytes(int index); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + * + * @return The condition. + */ + com.google.type.Expr getCondition(); + + /** + * + * + *
+   * The condition that is associated with this binding.
+   *
+   * If the condition evaluates to `true`, then this binding applies to the
+   * current request.
+   *
+   * If the condition evaluates to `false`, then this binding does not apply to
+   * the current request. However, a different role binding might grant the same
+   * role to one or more of the principals in this binding.
+   *
+   * To learn which resources support conditions in their IAM policies, see the
+   * [IAM
+   * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+   * 
+ * + * .google.type.Expr condition = 3; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java new file mode 100644 index 000000000000..28f364122562 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java @@ -0,0 +1,913 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Request message for `GetIamPolicy` method.
+ * 
+ * + * Protobuf type {@code google.iam.v1.GetIamPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetIamPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.GetIamPolicyRequest) + GetIamPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetIamPolicyRequest"); + } + + // Use GetIamPolicyRequest.newBuilder() to construct. + private GetIamPolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetIamPolicyRequest() { + resource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.GetIamPolicyRequest.class, + com.google.iam.v1.GetIamPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONS_FIELD_NUMBER = 2; + private com.google.iam.v1.GetPolicyOptions options_; + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return The options. + */ + @java.lang.Override + public com.google.iam.v1.GetPolicyOptions getOptions() { + return options_ == null ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() : options_; + } + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + @java.lang.Override + public com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder() { + return options_ == null ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() : options_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getOptions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.GetIamPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v1.GetIamPolicyRequest other = (com.google.iam.v1.GetIamPolicyRequest) obj; + + if (!getResource().equals(other.getResource())) return false; + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.GetIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `GetIamPolicy` method.
+   * 
+ * + * Protobuf type {@code google.iam.v1.GetIamPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.GetIamPolicyRequest) + com.google.iam.v1.GetIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.GetIamPolicyRequest.class, + com.google.iam.v1.GetIamPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v1.GetIamPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.GetIamPolicyRequest getDefaultInstanceForType() { + return com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.GetIamPolicyRequest build() { + com.google.iam.v1.GetIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.GetIamPolicyRequest buildPartial() { + com.google.iam.v1.GetIamPolicyRequest result = + new com.google.iam.v1.GetIamPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.GetIamPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.GetIamPolicyRequest) { + return mergeFrom((com.google.iam.v1.GetIamPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.GetIamPolicyRequest other) { + if (other == com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resource_ = ""; + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.iam.v1.GetPolicyOptions options_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.GetPolicyOptions, + com.google.iam.v1.GetPolicyOptions.Builder, + com.google.iam.v1.GetPolicyOptionsOrBuilder> + optionsBuilder_; + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return The options. + */ + public com.google.iam.v1.GetPolicyOptions getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public Builder setOptions(com.google.iam.v1.GetPolicyOptions value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + } else { + optionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public Builder setOptions(com.google.iam.v1.GetPolicyOptions.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public Builder mergeOptions(com.google.iam.v1.GetPolicyOptions value) { + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && options_ != null + && options_ != com.google.iam.v1.GetPolicyOptions.getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); + } else { + options_ = value; + } + } else { + optionsBuilder_.mergeFrom(value); + } + if (options_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000002); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public com.google.iam.v1.GetPolicyOptions.Builder getOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetOptionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + public com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() + : options_; + } + } + + /** + * + * + *
+     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+     * `GetIamPolicy`.
+     * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.GetPolicyOptions, + com.google.iam.v1.GetPolicyOptions.Builder, + com.google.iam.v1.GetPolicyOptionsOrBuilder> + internalGetOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.GetPolicyOptions, + com.google.iam.v1.GetPolicyOptions.Builder, + com.google.iam.v1.GetPolicyOptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.GetIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.GetIamPolicyRequest) + private static final com.google.iam.v1.GetIamPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.GetIamPolicyRequest(); + } + + public static com.google.iam.v1.GetIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.GetIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..750f5413b9ff --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface GetIamPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.GetIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + * + * @return The options. + */ + com.google.iam.v1.GetPolicyOptions getOptions(); + + /** + * + * + *
+   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+   * `GetIamPolicy`.
+   * 
+ * + * .google.iam.v1.GetPolicyOptions options = 2; + */ + com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java new file mode 100644 index 000000000000..2160f090641a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java @@ -0,0 +1,566 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/options.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Encapsulates settings provided to GetIamPolicy.
+ * 
+ * + * Protobuf type {@code google.iam.v1.GetPolicyOptions} + */ +@com.google.protobuf.Generated +public final class GetPolicyOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.GetPolicyOptions) + GetPolicyOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyOptions"); + } + + // Use GetPolicyOptions.newBuilder() to construct. + private GetPolicyOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyOptions() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.OptionsProto.internal_static_google_iam_v1_GetPolicyOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.OptionsProto + .internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.GetPolicyOptions.class, + com.google.iam.v1.GetPolicyOptions.Builder.class); + } + + public static final int REQUESTED_POLICY_VERSION_FIELD_NUMBER = 1; + private int requestedPolicyVersion_ = 0; + + /** + * + * + *
+   * 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).
+   * 
+ * + * int32 requested_policy_version = 1; + * + * @return The requestedPolicyVersion. + */ + @java.lang.Override + public int getRequestedPolicyVersion() { + return requestedPolicyVersion_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (requestedPolicyVersion_ != 0) { + output.writeInt32(1, requestedPolicyVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestedPolicyVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, requestedPolicyVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.GetPolicyOptions)) { + return super.equals(obj); + } + com.google.iam.v1.GetPolicyOptions other = (com.google.iam.v1.GetPolicyOptions) obj; + + if (getRequestedPolicyVersion() != other.getRequestedPolicyVersion()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REQUESTED_POLICY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRequestedPolicyVersion(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.GetPolicyOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetPolicyOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.GetPolicyOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.GetPolicyOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Encapsulates settings provided to GetIamPolicy.
+   * 
+ * + * Protobuf type {@code google.iam.v1.GetPolicyOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.GetPolicyOptions) + com.google.iam.v1.GetPolicyOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.OptionsProto + .internal_static_google_iam_v1_GetPolicyOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.OptionsProto + .internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.GetPolicyOptions.class, + com.google.iam.v1.GetPolicyOptions.Builder.class); + } + + // Construct using com.google.iam.v1.GetPolicyOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + requestedPolicyVersion_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.OptionsProto + .internal_static_google_iam_v1_GetPolicyOptions_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.GetPolicyOptions getDefaultInstanceForType() { + return com.google.iam.v1.GetPolicyOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.GetPolicyOptions build() { + com.google.iam.v1.GetPolicyOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.GetPolicyOptions buildPartial() { + com.google.iam.v1.GetPolicyOptions result = new com.google.iam.v1.GetPolicyOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.GetPolicyOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.requestedPolicyVersion_ = requestedPolicyVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.GetPolicyOptions) { + return mergeFrom((com.google.iam.v1.GetPolicyOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.GetPolicyOptions other) { + if (other == com.google.iam.v1.GetPolicyOptions.getDefaultInstance()) return this; + if (other.getRequestedPolicyVersion() != 0) { + setRequestedPolicyVersion(other.getRequestedPolicyVersion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + requestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int requestedPolicyVersion_; + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 requested_policy_version = 1; + * + * @return The requestedPolicyVersion. + */ + @java.lang.Override + public int getRequestedPolicyVersion() { + return requestedPolicyVersion_; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 requested_policy_version = 1; + * + * @param value The requestedPolicyVersion to set. + * @return This builder for chaining. + */ + public Builder setRequestedPolicyVersion(int value) { + + requestedPolicyVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 requested_policy_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearRequestedPolicyVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + requestedPolicyVersion_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.GetPolicyOptions) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.GetPolicyOptions) + private static final com.google.iam.v1.GetPolicyOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.GetPolicyOptions(); + } + + public static com.google.iam.v1.GetPolicyOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.GetPolicyOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java new file mode 100644 index 000000000000..de8c4f015831 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/options.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface GetPolicyOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.GetPolicyOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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).
+   * 
+ * + * int32 requested_policy_version = 1; + * + * @return The requestedPolicyVersion. + */ + int getRequestedPolicyVersion(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java new file mode 100644 index 000000000000..2488f07ee338 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public final class IamPolicyProto extends com.google.protobuf.GeneratedFile { + private IamPolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IamPolicyProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\036google/iam/v1/iam_policy.proto\022\rgoogle" + + ".iam.v1\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\032\033google/iam/v1/options.proto\032\032google/" + + "iam/v1/policy.proto\032 google/protobuf/fie" + + "ld_mask.proto\"\217\001\n\023SetIamPolicyRequest\022\033\n" + + "\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022*\n\006policy\030\002 \001" + + "(\0132\025.google.iam.v1.PolicyB\003\340A\002\022/\n\013update" + + "_mask\030\003 \001(\0132\032.google.protobuf.FieldMask\"" + + "d\n\023GetIamPolicyRequest\022\033\n\010resource\030\001 \001(\t" + + "B\t\340A\002\372A\003\n\001*\0220\n\007options\030\002 \001(\0132\037.google.ia" + + "m.v1.GetPolicyOptions\"R\n\031TestIamPermissi" + + "onsRequest\022\033\n\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022" + + "\030\n\013permissions\030\002 \003(\tB\003\340A\002\"1\n\032TestIamPerm" + + "issionsResponse\022\023\n\013permissions\030\001 \003(\t2\264\003\n" + + "\tIAMPolicy\022t\n\014SetIamPolicy\022\".google.iam." + + "v1.SetIamPolicyRequest\032\025.google.iam.v1.P" + + "olicy\")\202\323\344\223\002#\"\036/v1/{resource=**}:setIamP" + + "olicy:\001*\022t\n\014GetIamPolicy\022\".google.iam.v1" + + ".GetIamPolicyRequest\032\025.google.iam.v1.Pol" + + "icy\")\202\323\344\223\002#\"\036/v1/{resource=**}:getIamPol" + + "icy:\001*\022\232\001\n\022TestIamPermissions\022(.google.i" + + "am.v1.TestIamPermissionsRequest\032).google" + + ".iam.v1.TestIamPermissionsResponse\"/\202\323\344\223" + + "\002)\"$/v1/{resource=**}:testIamPermissions" + + ":\001*\032\036\312A\033iam-meta-api.googleapis.comB|\n\021c" + + "om.google.iam.v1B\016IamPolicyProtoP\001Z)clou" + + "d.google.com/go/iam/apiv1/iampb;iampb\252\002\023" + + "Google.Cloud.Iam.V1\312\002\023Google\\Cloud\\Iam\\V" + + "1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v1.OptionsProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v1_SetIamPolicyRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_SetIamPolicyRequest_descriptor, + new java.lang.String[] { + "Resource", "Policy", "UpdateMask", + }); + internal_static_google_iam_v1_GetIamPolicyRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_GetIamPolicyRequest_descriptor, + new java.lang.String[] { + "Resource", "Options", + }); + internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor, + new java.lang.String[] { + "Resource", "Permissions", + }); + internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor, + new java.lang.String[] { + "Permissions", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v1.OptionsProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/OptionsProto.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/OptionsProto.java new file mode 100644 index 000000000000..59e313ca88d5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/OptionsProto.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/options.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public final class OptionsProto extends com.google.protobuf.GeneratedFile { + private OptionsProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OptionsProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_GetPolicyOptions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\033google/iam/v1/options.proto\022\rgoogle.ia" + + "m.v1\"4\n\020GetPolicyOptions\022 \n\030requested_po" + + "licy_version\030\001 \001(\005B}\n\021com.google.iam.v1B" + + "\014OptionsProtoP\001Z)cloud.google.com/go/iam" + + "/apiv1/iampb;iampb\370\001\001\252\002\023Google.Cloud.Iam" + + ".V1\312\002\023Google\\Cloud\\Iam\\V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_iam_v1_GetPolicyOptions_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_GetPolicyOptions_descriptor, + new java.lang.String[] { + "RequestedPolicyVersion", + }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Policy.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Policy.java new file mode 100644 index 000000000000..ee80fb64dd95 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/Policy.java @@ -0,0 +1,2098 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * 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/).
+ * 
+ * + * Protobuf type {@code google.iam.v1.Policy} + */ +@com.google.protobuf.Generated +public final class Policy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.Policy) + PolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Policy"); + } + + // Use Policy.newBuilder() to construct. + private Policy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Policy() { + bindings_ = java.util.Collections.emptyList(); + auditConfigs_ = java.util.Collections.emptyList(); + etag_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.Policy.class, com.google.iam.v1.Policy.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private int version_ = 0; + + /** + * + * + *
+   * 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).
+   * 
+ * + * int32 version = 1; + * + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + + public static final int BINDINGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List bindings_; + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + @java.lang.Override + public java.util.List getBindingsList() { + return bindings_; + } + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + @java.lang.Override + public java.util.List getBindingsOrBuilderList() { + return bindings_; + } + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + @java.lang.Override + public int getBindingsCount() { + return bindings_.size(); + } + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + @java.lang.Override + public com.google.iam.v1.Binding getBindings(int index) { + return bindings_.get(index); + } + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + @java.lang.Override + public com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + return bindings_.get(index); + } + + public static final int AUDIT_CONFIGS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List auditConfigs_; + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + @java.lang.Override + public java.util.List getAuditConfigsList() { + return auditConfigs_; + } + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + @java.lang.Override + public java.util.List + getAuditConfigsOrBuilderList() { + return auditConfigs_; + } + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + @java.lang.Override + public int getAuditConfigsCount() { + return auditConfigs_.size(); + } + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + @java.lang.Override + public com.google.iam.v1.AuditConfig getAuditConfigs(int index) { + return auditConfigs_.get(index); + } + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + @java.lang.Override + public com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index) { + return auditConfigs_.get(index); + } + + public static final int ETAG_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString etag_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * `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.
+   * 
+ * + * bytes etag = 3; + * + * @return The etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtag() { + return etag_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (version_ != 0) { + output.writeInt32(1, version_); + } + if (!etag_.isEmpty()) { + output.writeBytes(3, etag_); + } + for (int i = 0; i < bindings_.size(); i++) { + output.writeMessage(4, bindings_.get(i)); + } + for (int i = 0; i < auditConfigs_.size(); i++) { + output.writeMessage(6, auditConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (version_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, version_); + } + if (!etag_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, etag_); + } + for (int i = 0; i < bindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, bindings_.get(i)); + } + for (int i = 0; i < auditConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, auditConfigs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.Policy)) { + return super.equals(obj); + } + com.google.iam.v1.Policy other = (com.google.iam.v1.Policy) obj; + + if (getVersion() != other.getVersion()) return false; + if (!getBindingsList().equals(other.getBindingsList())) return false; + if (!getAuditConfigsList().equals(other.getAuditConfigsList())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + if (getBindingsCount() > 0) { + hash = (37 * hash) + BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getBindingsList().hashCode(); + } + if (getAuditConfigsCount() > 0) { + hash = (37 * hash) + AUDIT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getAuditConfigsList().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.Policy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Policy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Policy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Policy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Policy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.Policy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.Policy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Policy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.Policy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Policy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.Policy parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.Policy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.Policy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * 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/).
+   * 
+ * + * Protobuf type {@code google.iam.v1.Policy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.Policy) + com.google.iam.v1.PolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.Policy.class, com.google.iam.v1.Policy.Builder.class); + } + + // Construct using com.google.iam.v1.Policy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = 0; + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + } else { + bindings_ = null; + bindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (auditConfigsBuilder_ == null) { + auditConfigs_ = java.util.Collections.emptyList(); + } else { + auditConfigs_ = null; + auditConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + etag_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.Policy getDefaultInstanceForType() { + return com.google.iam.v1.Policy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.Policy build() { + com.google.iam.v1.Policy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.Policy buildPartial() { + com.google.iam.v1.Policy result = new com.google.iam.v1.Policy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v1.Policy result) { + if (bindingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bindings_ = java.util.Collections.unmodifiableList(bindings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bindings_ = bindings_; + } else { + result.bindings_ = bindingsBuilder_.build(); + } + if (auditConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + auditConfigs_ = java.util.Collections.unmodifiableList(auditConfigs_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.auditConfigs_ = auditConfigs_; + } else { + result.auditConfigs_ = auditConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v1.Policy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.Policy) { + return mergeFrom((com.google.iam.v1.Policy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.Policy other) { + if (other == com.google.iam.v1.Policy.getDefaultInstance()) return this; + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (bindingsBuilder_ == null) { + if (!other.bindings_.isEmpty()) { + if (bindings_.isEmpty()) { + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBindingsIsMutable(); + bindings_.addAll(other.bindings_); + } + onChanged(); + } + } else { + if (!other.bindings_.isEmpty()) { + if (bindingsBuilder_.isEmpty()) { + bindingsBuilder_.dispose(); + bindingsBuilder_ = null; + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000002); + bindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBindingsFieldBuilder() + : null; + } else { + bindingsBuilder_.addAllMessages(other.bindings_); + } + } + } + if (auditConfigsBuilder_ == null) { + if (!other.auditConfigs_.isEmpty()) { + if (auditConfigs_.isEmpty()) { + auditConfigs_ = other.auditConfigs_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAuditConfigsIsMutable(); + auditConfigs_.addAll(other.auditConfigs_); + } + onChanged(); + } + } else { + if (!other.auditConfigs_.isEmpty()) { + if (auditConfigsBuilder_.isEmpty()) { + auditConfigsBuilder_.dispose(); + auditConfigsBuilder_ = null; + auditConfigs_ = other.auditConfigs_; + bitField0_ = (bitField0_ & ~0x00000004); + auditConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAuditConfigsFieldBuilder() + : null; + } else { + auditConfigsBuilder_.addAllMessages(other.auditConfigs_); + } + } + } + if (!other.getEtag().isEmpty()) { + setEtag(other.getEtag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + version_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + etag_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.iam.v1.Binding m = + input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case 34 + case 50: + { + com.google.iam.v1.AuditConfig m = + input.readMessage(com.google.iam.v1.AuditConfig.parser(), extensionRegistry); + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.add(m); + } else { + auditConfigsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int version_; + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 version = 1; + * + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(int value) { + + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * int32 version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + version_ = 0; + onChanged(); + return this; + } + + private java.util.List bindings_ = java.util.Collections.emptyList(); + + private void ensureBindingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bindings_ = new java.util.ArrayList(bindings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder> + bindingsBuilder_; + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public java.util.List getBindingsList() { + if (bindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bindings_); + } else { + return bindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public int getBindingsCount() { + if (bindingsBuilder_ == null) { + return bindings_.size(); + } else { + return bindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public com.google.iam.v1.Binding getBindings(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder setBindings(int index, com.google.iam.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.set(index, value); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder setBindings(int index, com.google.iam.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.set(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder addBindings(com.google.iam.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(value); + onChanged(); + } else { + bindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder addBindings(int index, com.google.iam.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(index, value); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder addBindings(com.google.iam.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder addBindings(int index, com.google.iam.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder addAllBindings(java.lang.Iterable values) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindings_); + onChanged(); + } else { + bindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder clearBindings() { + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public Builder removeBindings(int index) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.remove(index); + onChanged(); + } else { + bindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public com.google.iam.v1.Binding.Builder getBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public java.util.List getBindingsOrBuilderList() { + if (bindingsBuilder_ != null) { + return bindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bindings_); + } + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public com.google.iam.v1.Binding.Builder addBindingsBuilder() { + return internalGetBindingsFieldBuilder() + .addBuilder(com.google.iam.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public com.google.iam.v1.Binding.Builder addBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * 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`.
+     * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + public java.util.List getBindingsBuilderList() { + return internalGetBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder> + internalGetBindingsFieldBuilder() { + if (bindingsBuilder_ == null) { + bindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder>( + bindings_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + bindings_ = null; + } + return bindingsBuilder_; + } + + private java.util.List auditConfigs_ = + java.util.Collections.emptyList(); + + private void ensureAuditConfigsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + auditConfigs_ = new java.util.ArrayList(auditConfigs_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfig, + com.google.iam.v1.AuditConfig.Builder, + com.google.iam.v1.AuditConfigOrBuilder> + auditConfigsBuilder_; + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public java.util.List getAuditConfigsList() { + if (auditConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(auditConfigs_); + } else { + return auditConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public int getAuditConfigsCount() { + if (auditConfigsBuilder_ == null) { + return auditConfigs_.size(); + } else { + return auditConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public com.google.iam.v1.AuditConfig getAuditConfigs(int index) { + if (auditConfigsBuilder_ == null) { + return auditConfigs_.get(index); + } else { + return auditConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder setAuditConfigs(int index, com.google.iam.v1.AuditConfig value) { + if (auditConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigsIsMutable(); + auditConfigs_.set(index, value); + onChanged(); + } else { + auditConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder setAuditConfigs( + int index, com.google.iam.v1.AuditConfig.Builder builderForValue) { + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + auditConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder addAuditConfigs(com.google.iam.v1.AuditConfig value) { + if (auditConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigsIsMutable(); + auditConfigs_.add(value); + onChanged(); + } else { + auditConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder addAuditConfigs(int index, com.google.iam.v1.AuditConfig value) { + if (auditConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigsIsMutable(); + auditConfigs_.add(index, value); + onChanged(); + } else { + auditConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder addAuditConfigs(com.google.iam.v1.AuditConfig.Builder builderForValue) { + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.add(builderForValue.build()); + onChanged(); + } else { + auditConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder addAuditConfigs( + int index, com.google.iam.v1.AuditConfig.Builder builderForValue) { + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + auditConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder addAllAuditConfigs( + java.lang.Iterable values) { + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditConfigs_); + onChanged(); + } else { + auditConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder clearAuditConfigs() { + if (auditConfigsBuilder_ == null) { + auditConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + auditConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public Builder removeAuditConfigs(int index) { + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.remove(index); + onChanged(); + } else { + auditConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public com.google.iam.v1.AuditConfig.Builder getAuditConfigsBuilder(int index) { + return internalGetAuditConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index) { + if (auditConfigsBuilder_ == null) { + return auditConfigs_.get(index); + } else { + return auditConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public java.util.List + getAuditConfigsOrBuilderList() { + if (auditConfigsBuilder_ != null) { + return auditConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auditConfigs_); + } + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public com.google.iam.v1.AuditConfig.Builder addAuditConfigsBuilder() { + return internalGetAuditConfigsFieldBuilder() + .addBuilder(com.google.iam.v1.AuditConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public com.google.iam.v1.AuditConfig.Builder addAuditConfigsBuilder(int index) { + return internalGetAuditConfigsFieldBuilder() + .addBuilder(index, com.google.iam.v1.AuditConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Specifies cloud audit logging configuration for this policy.
+     * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + public java.util.List getAuditConfigsBuilderList() { + return internalGetAuditConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfig, + com.google.iam.v1.AuditConfig.Builder, + com.google.iam.v1.AuditConfigOrBuilder> + internalGetAuditConfigsFieldBuilder() { + if (auditConfigsBuilder_ == null) { + auditConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfig, + com.google.iam.v1.AuditConfig.Builder, + com.google.iam.v1.AuditConfigOrBuilder>( + auditConfigs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + auditConfigs_ = null; + } + return auditConfigsBuilder_; + } + + private com.google.protobuf.ByteString etag_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * `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.
+     * 
+ * + * bytes etag = 3; + * + * @return The etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtag() { + return etag_; + } + + /** + * + * + *
+     * `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.
+     * 
+ * + * bytes etag = 3; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * `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.
+     * 
+ * + * bytes etag = 3; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + bitField0_ = (bitField0_ & ~0x00000008); + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.Policy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.Policy) + private static final com.google.iam.v1.Policy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.Policy(); + } + + public static com.google.iam.v1.Policy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Policy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.Policy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDelta.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDelta.java new file mode 100644 index 000000000000..67891e9dc1f4 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDelta.java @@ -0,0 +1,1429 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * The difference delta between two policies.
+ * 
+ * + * Protobuf type {@code google.iam.v1.PolicyDelta} + */ +@com.google.protobuf.Generated +public final class PolicyDelta extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.PolicyDelta) + PolicyDeltaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyDelta"); + } + + // Use PolicyDelta.newBuilder() to construct. + private PolicyDelta(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyDelta() { + bindingDeltas_ = java.util.Collections.emptyList(); + auditConfigDeltas_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.PolicyDelta.class, com.google.iam.v1.PolicyDelta.Builder.class); + } + + public static final int BINDING_DELTAS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bindingDeltas_; + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + @java.lang.Override + public java.util.List getBindingDeltasList() { + return bindingDeltas_; + } + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + @java.lang.Override + public java.util.List + getBindingDeltasOrBuilderList() { + return bindingDeltas_; + } + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + @java.lang.Override + public int getBindingDeltasCount() { + return bindingDeltas_.size(); + } + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + @java.lang.Override + public com.google.iam.v1.BindingDelta getBindingDeltas(int index) { + return bindingDeltas_.get(index); + } + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + @java.lang.Override + public com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index) { + return bindingDeltas_.get(index); + } + + public static final int AUDIT_CONFIG_DELTAS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List auditConfigDeltas_; + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + @java.lang.Override + public java.util.List getAuditConfigDeltasList() { + return auditConfigDeltas_; + } + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + @java.lang.Override + public java.util.List + getAuditConfigDeltasOrBuilderList() { + return auditConfigDeltas_; + } + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + @java.lang.Override + public int getAuditConfigDeltasCount() { + return auditConfigDeltas_.size(); + } + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + @java.lang.Override + public com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index) { + return auditConfigDeltas_.get(index); + } + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + @java.lang.Override + public com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index) { + return auditConfigDeltas_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < bindingDeltas_.size(); i++) { + output.writeMessage(1, bindingDeltas_.get(i)); + } + for (int i = 0; i < auditConfigDeltas_.size(); i++) { + output.writeMessage(2, auditConfigDeltas_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bindingDeltas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bindingDeltas_.get(i)); + } + for (int i = 0; i < auditConfigDeltas_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, auditConfigDeltas_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.PolicyDelta)) { + return super.equals(obj); + } + com.google.iam.v1.PolicyDelta other = (com.google.iam.v1.PolicyDelta) obj; + + if (!getBindingDeltasList().equals(other.getBindingDeltasList())) return false; + if (!getAuditConfigDeltasList().equals(other.getAuditConfigDeltasList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBindingDeltasCount() > 0) { + hash = (37 * hash) + BINDING_DELTAS_FIELD_NUMBER; + hash = (53 * hash) + getBindingDeltasList().hashCode(); + } + if (getAuditConfigDeltasCount() > 0) { + hash = (37 * hash) + AUDIT_CONFIG_DELTAS_FIELD_NUMBER; + hash = (53 * hash) + getAuditConfigDeltasList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.PolicyDelta parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.PolicyDelta parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.PolicyDelta parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.PolicyDelta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.PolicyDelta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.PolicyDelta parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.PolicyDelta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.PolicyDelta parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.PolicyDelta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.PolicyDelta parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.PolicyDelta parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.PolicyDelta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.PolicyDelta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The difference delta between two policies.
+   * 
+ * + * Protobuf type {@code google.iam.v1.PolicyDelta} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.PolicyDelta) + com.google.iam.v1.PolicyDeltaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.PolicyProto + .internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.PolicyDelta.class, com.google.iam.v1.PolicyDelta.Builder.class); + } + + // Construct using com.google.iam.v1.PolicyDelta.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bindingDeltasBuilder_ == null) { + bindingDeltas_ = java.util.Collections.emptyList(); + } else { + bindingDeltas_ = null; + bindingDeltasBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (auditConfigDeltasBuilder_ == null) { + auditConfigDeltas_ = java.util.Collections.emptyList(); + } else { + auditConfigDeltas_ = null; + auditConfigDeltasBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.PolicyDelta getDefaultInstanceForType() { + return com.google.iam.v1.PolicyDelta.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.PolicyDelta build() { + com.google.iam.v1.PolicyDelta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.PolicyDelta buildPartial() { + com.google.iam.v1.PolicyDelta result = new com.google.iam.v1.PolicyDelta(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v1.PolicyDelta result) { + if (bindingDeltasBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bindingDeltas_ = java.util.Collections.unmodifiableList(bindingDeltas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bindingDeltas_ = bindingDeltas_; + } else { + result.bindingDeltas_ = bindingDeltasBuilder_.build(); + } + if (auditConfigDeltasBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + auditConfigDeltas_ = java.util.Collections.unmodifiableList(auditConfigDeltas_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.auditConfigDeltas_ = auditConfigDeltas_; + } else { + result.auditConfigDeltas_ = auditConfigDeltasBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v1.PolicyDelta result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.PolicyDelta) { + return mergeFrom((com.google.iam.v1.PolicyDelta) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.PolicyDelta other) { + if (other == com.google.iam.v1.PolicyDelta.getDefaultInstance()) return this; + if (bindingDeltasBuilder_ == null) { + if (!other.bindingDeltas_.isEmpty()) { + if (bindingDeltas_.isEmpty()) { + bindingDeltas_ = other.bindingDeltas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBindingDeltasIsMutable(); + bindingDeltas_.addAll(other.bindingDeltas_); + } + onChanged(); + } + } else { + if (!other.bindingDeltas_.isEmpty()) { + if (bindingDeltasBuilder_.isEmpty()) { + bindingDeltasBuilder_.dispose(); + bindingDeltasBuilder_ = null; + bindingDeltas_ = other.bindingDeltas_; + bitField0_ = (bitField0_ & ~0x00000001); + bindingDeltasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBindingDeltasFieldBuilder() + : null; + } else { + bindingDeltasBuilder_.addAllMessages(other.bindingDeltas_); + } + } + } + if (auditConfigDeltasBuilder_ == null) { + if (!other.auditConfigDeltas_.isEmpty()) { + if (auditConfigDeltas_.isEmpty()) { + auditConfigDeltas_ = other.auditConfigDeltas_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.addAll(other.auditConfigDeltas_); + } + onChanged(); + } + } else { + if (!other.auditConfigDeltas_.isEmpty()) { + if (auditConfigDeltasBuilder_.isEmpty()) { + auditConfigDeltasBuilder_.dispose(); + auditConfigDeltasBuilder_ = null; + auditConfigDeltas_ = other.auditConfigDeltas_; + bitField0_ = (bitField0_ & ~0x00000002); + auditConfigDeltasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAuditConfigDeltasFieldBuilder() + : null; + } else { + auditConfigDeltasBuilder_.addAllMessages(other.auditConfigDeltas_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v1.BindingDelta m = + input.readMessage(com.google.iam.v1.BindingDelta.parser(), extensionRegistry); + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(m); + } else { + bindingDeltasBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.iam.v1.AuditConfigDelta m = + input.readMessage( + com.google.iam.v1.AuditConfigDelta.parser(), extensionRegistry); + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(m); + } else { + auditConfigDeltasBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List bindingDeltas_ = + java.util.Collections.emptyList(); + + private void ensureBindingDeltasIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bindingDeltas_ = new java.util.ArrayList(bindingDeltas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.BindingDelta, + com.google.iam.v1.BindingDelta.Builder, + com.google.iam.v1.BindingDeltaOrBuilder> + bindingDeltasBuilder_; + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public java.util.List getBindingDeltasList() { + if (bindingDeltasBuilder_ == null) { + return java.util.Collections.unmodifiableList(bindingDeltas_); + } else { + return bindingDeltasBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public int getBindingDeltasCount() { + if (bindingDeltasBuilder_ == null) { + return bindingDeltas_.size(); + } else { + return bindingDeltasBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public com.google.iam.v1.BindingDelta getBindingDeltas(int index) { + if (bindingDeltasBuilder_ == null) { + return bindingDeltas_.get(index); + } else { + return bindingDeltasBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder setBindingDeltas(int index, com.google.iam.v1.BindingDelta value) { + if (bindingDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingDeltasIsMutable(); + bindingDeltas_.set(index, value); + onChanged(); + } else { + bindingDeltasBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder setBindingDeltas( + int index, com.google.iam.v1.BindingDelta.Builder builderForValue) { + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.set(index, builderForValue.build()); + onChanged(); + } else { + bindingDeltasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder addBindingDeltas(com.google.iam.v1.BindingDelta value) { + if (bindingDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(value); + onChanged(); + } else { + bindingDeltasBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder addBindingDeltas(int index, com.google.iam.v1.BindingDelta value) { + if (bindingDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(index, value); + onChanged(); + } else { + bindingDeltasBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder addBindingDeltas(com.google.iam.v1.BindingDelta.Builder builderForValue) { + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(builderForValue.build()); + onChanged(); + } else { + bindingDeltasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder addBindingDeltas( + int index, com.google.iam.v1.BindingDelta.Builder builderForValue) { + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(index, builderForValue.build()); + onChanged(); + } else { + bindingDeltasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder addAllBindingDeltas( + java.lang.Iterable values) { + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindingDeltas_); + onChanged(); + } else { + bindingDeltasBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder clearBindingDeltas() { + if (bindingDeltasBuilder_ == null) { + bindingDeltas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bindingDeltasBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public Builder removeBindingDeltas(int index) { + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.remove(index); + onChanged(); + } else { + bindingDeltasBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public com.google.iam.v1.BindingDelta.Builder getBindingDeltasBuilder(int index) { + return internalGetBindingDeltasFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index) { + if (bindingDeltasBuilder_ == null) { + return bindingDeltas_.get(index); + } else { + return bindingDeltasBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public java.util.List + getBindingDeltasOrBuilderList() { + if (bindingDeltasBuilder_ != null) { + return bindingDeltasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bindingDeltas_); + } + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public com.google.iam.v1.BindingDelta.Builder addBindingDeltasBuilder() { + return internalGetBindingDeltasFieldBuilder() + .addBuilder(com.google.iam.v1.BindingDelta.getDefaultInstance()); + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public com.google.iam.v1.BindingDelta.Builder addBindingDeltasBuilder(int index) { + return internalGetBindingDeltasFieldBuilder() + .addBuilder(index, com.google.iam.v1.BindingDelta.getDefaultInstance()); + } + + /** + * + * + *
+     * The delta for Bindings between two policies.
+     * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + public java.util.List getBindingDeltasBuilderList() { + return internalGetBindingDeltasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.BindingDelta, + com.google.iam.v1.BindingDelta.Builder, + com.google.iam.v1.BindingDeltaOrBuilder> + internalGetBindingDeltasFieldBuilder() { + if (bindingDeltasBuilder_ == null) { + bindingDeltasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.BindingDelta, + com.google.iam.v1.BindingDelta.Builder, + com.google.iam.v1.BindingDeltaOrBuilder>( + bindingDeltas_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bindingDeltas_ = null; + } + return bindingDeltasBuilder_; + } + + private java.util.List auditConfigDeltas_ = + java.util.Collections.emptyList(); + + private void ensureAuditConfigDeltasIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + auditConfigDeltas_ = + new java.util.ArrayList(auditConfigDeltas_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfigDelta, + com.google.iam.v1.AuditConfigDelta.Builder, + com.google.iam.v1.AuditConfigDeltaOrBuilder> + auditConfigDeltasBuilder_; + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public java.util.List getAuditConfigDeltasList() { + if (auditConfigDeltasBuilder_ == null) { + return java.util.Collections.unmodifiableList(auditConfigDeltas_); + } else { + return auditConfigDeltasBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public int getAuditConfigDeltasCount() { + if (auditConfigDeltasBuilder_ == null) { + return auditConfigDeltas_.size(); + } else { + return auditConfigDeltasBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index) { + if (auditConfigDeltasBuilder_ == null) { + return auditConfigDeltas_.get(index); + } else { + return auditConfigDeltasBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder setAuditConfigDeltas(int index, com.google.iam.v1.AuditConfigDelta value) { + if (auditConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.set(index, value); + onChanged(); + } else { + auditConfigDeltasBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder setAuditConfigDeltas( + int index, com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.set(index, builderForValue.build()); + onChanged(); + } else { + auditConfigDeltasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder addAuditConfigDeltas(com.google.iam.v1.AuditConfigDelta value) { + if (auditConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(value); + onChanged(); + } else { + auditConfigDeltasBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder addAuditConfigDeltas(int index, com.google.iam.v1.AuditConfigDelta value) { + if (auditConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(index, value); + onChanged(); + } else { + auditConfigDeltasBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder addAuditConfigDeltas( + com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(builderForValue.build()); + onChanged(); + } else { + auditConfigDeltasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder addAuditConfigDeltas( + int index, com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(index, builderForValue.build()); + onChanged(); + } else { + auditConfigDeltasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder addAllAuditConfigDeltas( + java.lang.Iterable values) { + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditConfigDeltas_); + onChanged(); + } else { + auditConfigDeltasBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder clearAuditConfigDeltas() { + if (auditConfigDeltasBuilder_ == null) { + auditConfigDeltas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + auditConfigDeltasBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public Builder removeAuditConfigDeltas(int index) { + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.remove(index); + onChanged(); + } else { + auditConfigDeltasBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public com.google.iam.v1.AuditConfigDelta.Builder getAuditConfigDeltasBuilder(int index) { + return internalGetAuditConfigDeltasFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index) { + if (auditConfigDeltasBuilder_ == null) { + return auditConfigDeltas_.get(index); + } else { + return auditConfigDeltasBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public java.util.List + getAuditConfigDeltasOrBuilderList() { + if (auditConfigDeltasBuilder_ != null) { + return auditConfigDeltasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auditConfigDeltas_); + } + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public com.google.iam.v1.AuditConfigDelta.Builder addAuditConfigDeltasBuilder() { + return internalGetAuditConfigDeltasFieldBuilder() + .addBuilder(com.google.iam.v1.AuditConfigDelta.getDefaultInstance()); + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public com.google.iam.v1.AuditConfigDelta.Builder addAuditConfigDeltasBuilder(int index) { + return internalGetAuditConfigDeltasFieldBuilder() + .addBuilder(index, com.google.iam.v1.AuditConfigDelta.getDefaultInstance()); + } + + /** + * + * + *
+     * The delta for AuditConfigs between two policies.
+     * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + public java.util.List + getAuditConfigDeltasBuilderList() { + return internalGetAuditConfigDeltasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfigDelta, + com.google.iam.v1.AuditConfigDelta.Builder, + com.google.iam.v1.AuditConfigDeltaOrBuilder> + internalGetAuditConfigDeltasFieldBuilder() { + if (auditConfigDeltasBuilder_ == null) { + auditConfigDeltasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v1.AuditConfigDelta, + com.google.iam.v1.AuditConfigDelta.Builder, + com.google.iam.v1.AuditConfigDeltaOrBuilder>( + auditConfigDeltas_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + auditConfigDeltas_ = null; + } + return auditConfigDeltasBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.PolicyDelta) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.PolicyDelta) + private static final com.google.iam.v1.PolicyDelta DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.PolicyDelta(); + } + + public static com.google.iam.v1.PolicyDelta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyDelta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.PolicyDelta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java new file mode 100644 index 000000000000..56c23e694f62 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface PolicyDeltaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.PolicyDelta) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + java.util.List getBindingDeltasList(); + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + com.google.iam.v1.BindingDelta getBindingDeltas(int index); + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + int getBindingDeltasCount(); + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + java.util.List getBindingDeltasOrBuilderList(); + + /** + * + * + *
+   * The delta for Bindings between two policies.
+   * 
+ * + * repeated .google.iam.v1.BindingDelta binding_deltas = 1; + */ + com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index); + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + java.util.List getAuditConfigDeltasList(); + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index); + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + int getAuditConfigDeltasCount(); + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + java.util.List + getAuditConfigDeltasOrBuilderList(); + + /** + * + * + *
+   * The delta for AuditConfigs between two policies.
+   * 
+ * + * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; + */ + com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java new file mode 100644 index 000000000000..1cc516de8d83 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java @@ -0,0 +1,244 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface PolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.Policy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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).
+   * 
+ * + * int32 version = 1; + * + * @return The version. + */ + int getVersion(); + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + java.util.List getBindingsList(); + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + com.google.iam.v1.Binding getBindings(int index); + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + int getBindingsCount(); + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + java.util.List getBindingsOrBuilderList(); + + /** + * + * + *
+   * 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`.
+   * 
+ * + * repeated .google.iam.v1.Binding bindings = 4; + */ + com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index); + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + java.util.List getAuditConfigsList(); + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + com.google.iam.v1.AuditConfig getAuditConfigs(int index); + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + int getAuditConfigsCount(); + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + java.util.List getAuditConfigsOrBuilderList(); + + /** + * + * + *
+   * Specifies cloud audit logging configuration for this policy.
+   * 
+ * + * repeated .google.iam.v1.AuditConfig audit_configs = 6; + */ + com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index); + + /** + * + * + *
+   * `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.
+   * 
+ * + * bytes etag = 3; + * + * @return The etag. + */ + com.google.protobuf.ByteString getEtag(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyProto.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyProto.java new file mode 100644 index 000000000000..14c6b44760f5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/PolicyProto.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public final class PolicyProto extends com.google.protobuf.GeneratedFile { + private PolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_Policy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_Policy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_Binding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_Binding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_AuditConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_AuditConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_AuditLogConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_PolicyDelta_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_BindingDelta_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_BindingDelta_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_AuditConfigDelta_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\032google/iam/v1/policy.proto\022\rgoogle.iam" + + ".v1\032\026google/type/expr.proto\"\204\001\n\006Policy\022\017" + + "\n\007version\030\001 \001(\005\022(\n\010bindings\030\004 \003(\0132\026.goog" + + "le.iam.v1.Binding\0221\n\raudit_configs\030\006 \003(\013" + + "2\032.google.iam.v1.AuditConfig\022\014\n\004etag\030\003 \001" + + "(\014\"N\n\007Binding\022\014\n\004role\030\001 \001(\t\022\017\n\007members\030\002" + + " \003(\t\022$\n\tcondition\030\003 \001(\0132\021.google.type.Ex" + + "pr\"X\n\013AuditConfig\022\017\n\007service\030\001 \001(\t\0228\n\021au" + + "dit_log_configs\030\003 \003(\0132\035.google.iam.v1.Au" + + "ditLogConfig\"\267\001\n\016AuditLogConfig\0227\n\010log_t" + + "ype\030\001 \001(\0162%.google.iam.v1.AuditLogConfig" + + ".LogType\022\030\n\020exempted_members\030\002 \003(\t\"R\n\007Lo" + + "gType\022\030\n\024LOG_TYPE_UNSPECIFIED\020\000\022\016\n\nADMIN" + + "_READ\020\001\022\016\n\nDATA_WRITE\020\002\022\r\n\tDATA_READ\020\003\"\200" + + "\001\n\013PolicyDelta\0223\n\016binding_deltas\030\001 \003(\0132\033" + + ".google.iam.v1.BindingDelta\022<\n\023audit_con" + + "fig_deltas\030\002 \003(\0132\037.google.iam.v1.AuditCo" + + "nfigDelta\"\275\001\n\014BindingDelta\0222\n\006action\030\001 \001" + + "(\0162\".google.iam.v1.BindingDelta.Action\022\014" + + "\n\004role\030\002 \001(\t\022\016\n\006member\030\003 \001(\t\022$\n\tconditio" + + "n\030\004 \001(\0132\021.google.type.Expr\"5\n\006Action\022\026\n\022" + + "ACTION_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020" + + "\002\"\275\001\n\020AuditConfigDelta\0226\n\006action\030\001 \001(\0162&" + + ".google.iam.v1.AuditConfigDelta.Action\022\017" + + "\n\007service\030\002 \001(\t\022\027\n\017exempted_member\030\003 \001(\t" + + "\022\020\n\010log_type\030\004 \001(\t\"5\n\006Action\022\026\n\022ACTION_U" + + "NSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002B|\n\021com" + + ".google.iam.v1B\013PolicyProtoP\001Z)cloud.goo" + + "gle.com/go/iam/apiv1/iampb;iampb\370\001\001\252\002\023Go" + + "ogle.Cloud.Iam.V1\312\002\023Google\\Cloud\\Iam\\V1b" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v1_Policy_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v1_Policy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_Policy_descriptor, + new java.lang.String[] { + "Version", "Bindings", "AuditConfigs", "Etag", + }); + internal_static_google_iam_v1_Binding_descriptor = getDescriptor().getMessageType(1); + internal_static_google_iam_v1_Binding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_Binding_descriptor, + new java.lang.String[] { + "Role", "Members", "Condition", + }); + internal_static_google_iam_v1_AuditConfig_descriptor = getDescriptor().getMessageType(2); + internal_static_google_iam_v1_AuditConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_AuditConfig_descriptor, + new java.lang.String[] { + "Service", "AuditLogConfigs", + }); + internal_static_google_iam_v1_AuditLogConfig_descriptor = getDescriptor().getMessageType(3); + internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_AuditLogConfig_descriptor, + new java.lang.String[] { + "LogType", "ExemptedMembers", + }); + internal_static_google_iam_v1_PolicyDelta_descriptor = getDescriptor().getMessageType(4); + internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_PolicyDelta_descriptor, + new java.lang.String[] { + "BindingDeltas", "AuditConfigDeltas", + }); + internal_static_google_iam_v1_BindingDelta_descriptor = getDescriptor().getMessageType(5); + internal_static_google_iam_v1_BindingDelta_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_BindingDelta_descriptor, + new java.lang.String[] { + "Action", "Role", "Member", "Condition", + }); + internal_static_google_iam_v1_AuditConfigDelta_descriptor = getDescriptor().getMessageType(6); + internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_AuditConfigDelta_descriptor, + new java.lang.String[] { + "Action", "Service", "ExemptedMember", "LogType", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.type.ExprProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMember.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMember.java new file mode 100644 index 000000000000..c967b0a647e2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMember.java @@ -0,0 +1,879 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/resource_policy_member.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Output-only policy member strings of a Google Cloud resource's built-in
+ * identity.
+ * 
+ * + * Protobuf type {@code google.iam.v1.ResourcePolicyMember} + */ +@com.google.protobuf.Generated +public final class ResourcePolicyMember extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.ResourcePolicyMember) + ResourcePolicyMemberOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResourcePolicyMember"); + } + + // Use ResourcePolicyMember.newBuilder() to construct. + private ResourcePolicyMember(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ResourcePolicyMember() { + iamPolicyNamePrincipal_ = ""; + iamPolicyUidPrincipal_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.ResourcePolicyMemberProto + .internal_static_google_iam_v1_ResourcePolicyMember_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.ResourcePolicyMemberProto + .internal_static_google_iam_v1_ResourcePolicyMember_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.ResourcePolicyMember.class, + com.google.iam.v1.ResourcePolicyMember.Builder.class); + } + + public static final int IAM_POLICY_NAME_PRINCIPAL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object iamPolicyNamePrincipal_ = ""; + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+   * and recreated with the same name, the binding will be applicable to the new
+   * resource.
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+   * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The iamPolicyNamePrincipal. + */ + @java.lang.Override + public java.lang.String getIamPolicyNamePrincipal() { + java.lang.Object ref = iamPolicyNamePrincipal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamPolicyNamePrincipal_ = s; + return s; + } + } + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+   * and recreated with the same name, the binding will be applicable to the new
+   * resource.
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+   * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for iamPolicyNamePrincipal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIamPolicyNamePrincipalBytes() { + java.lang.Object ref = iamPolicyNamePrincipal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamPolicyNamePrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IAM_POLICY_UID_PRINCIPAL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object iamPolicyUidPrincipal_ = ""; + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+   * resource is deleted and recreated with the same name, the binding will not
+   * be applicable to the new resource
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+   * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The iamPolicyUidPrincipal. + */ + @java.lang.Override + public java.lang.String getIamPolicyUidPrincipal() { + java.lang.Object ref = iamPolicyUidPrincipal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamPolicyUidPrincipal_ = s; + return s; + } + } + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+   * resource is deleted and recreated with the same name, the binding will not
+   * be applicable to the new resource
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+   * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for iamPolicyUidPrincipal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIamPolicyUidPrincipalBytes() { + java.lang.Object ref = iamPolicyUidPrincipal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamPolicyUidPrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iamPolicyNamePrincipal_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, iamPolicyNamePrincipal_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iamPolicyUidPrincipal_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, iamPolicyUidPrincipal_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iamPolicyNamePrincipal_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, iamPolicyNamePrincipal_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iamPolicyUidPrincipal_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, iamPolicyUidPrincipal_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.ResourcePolicyMember)) { + return super.equals(obj); + } + com.google.iam.v1.ResourcePolicyMember other = (com.google.iam.v1.ResourcePolicyMember) obj; + + if (!getIamPolicyNamePrincipal().equals(other.getIamPolicyNamePrincipal())) return false; + if (!getIamPolicyUidPrincipal().equals(other.getIamPolicyUidPrincipal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IAM_POLICY_NAME_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicyNamePrincipal().hashCode(); + hash = (37 * hash) + IAM_POLICY_UID_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicyUidPrincipal().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.ResourcePolicyMember parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.ResourcePolicyMember parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.ResourcePolicyMember parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.ResourcePolicyMember prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Output-only policy member strings of a Google Cloud resource's built-in
+   * identity.
+   * 
+ * + * Protobuf type {@code google.iam.v1.ResourcePolicyMember} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.ResourcePolicyMember) + com.google.iam.v1.ResourcePolicyMemberOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.ResourcePolicyMemberProto + .internal_static_google_iam_v1_ResourcePolicyMember_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.ResourcePolicyMemberProto + .internal_static_google_iam_v1_ResourcePolicyMember_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.ResourcePolicyMember.class, + com.google.iam.v1.ResourcePolicyMember.Builder.class); + } + + // Construct using com.google.iam.v1.ResourcePolicyMember.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + iamPolicyNamePrincipal_ = ""; + iamPolicyUidPrincipal_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.ResourcePolicyMemberProto + .internal_static_google_iam_v1_ResourcePolicyMember_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.ResourcePolicyMember getDefaultInstanceForType() { + return com.google.iam.v1.ResourcePolicyMember.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.ResourcePolicyMember build() { + com.google.iam.v1.ResourcePolicyMember result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.ResourcePolicyMember buildPartial() { + com.google.iam.v1.ResourcePolicyMember result = + new com.google.iam.v1.ResourcePolicyMember(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.ResourcePolicyMember result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.iamPolicyNamePrincipal_ = iamPolicyNamePrincipal_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.iamPolicyUidPrincipal_ = iamPolicyUidPrincipal_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.ResourcePolicyMember) { + return mergeFrom((com.google.iam.v1.ResourcePolicyMember) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.ResourcePolicyMember other) { + if (other == com.google.iam.v1.ResourcePolicyMember.getDefaultInstance()) return this; + if (!other.getIamPolicyNamePrincipal().isEmpty()) { + iamPolicyNamePrincipal_ = other.iamPolicyNamePrincipal_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIamPolicyUidPrincipal().isEmpty()) { + iamPolicyUidPrincipal_ = other.iamPolicyUidPrincipal_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + iamPolicyNamePrincipal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + iamPolicyUidPrincipal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object iamPolicyNamePrincipal_ = ""; + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+     * and recreated with the same name, the binding will be applicable to the new
+     * resource.
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+     * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The iamPolicyNamePrincipal. + */ + public java.lang.String getIamPolicyNamePrincipal() { + java.lang.Object ref = iamPolicyNamePrincipal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamPolicyNamePrincipal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+     * and recreated with the same name, the binding will be applicable to the new
+     * resource.
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+     * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for iamPolicyNamePrincipal. + */ + public com.google.protobuf.ByteString getIamPolicyNamePrincipalBytes() { + java.lang.Object ref = iamPolicyNamePrincipal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamPolicyNamePrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+     * and recreated with the same name, the binding will be applicable to the new
+     * resource.
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+     * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The iamPolicyNamePrincipal to set. + * @return This builder for chaining. + */ + public Builder setIamPolicyNamePrincipal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicyNamePrincipal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+     * and recreated with the same name, the binding will be applicable to the new
+     * resource.
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+     * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIamPolicyNamePrincipal() { + iamPolicyNamePrincipal_ = getDefaultInstance().getIamPolicyNamePrincipal(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+     * and recreated with the same name, the binding will be applicable to the new
+     * resource.
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+     * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for iamPolicyNamePrincipal to set. + * @return This builder for chaining. + */ + public Builder setIamPolicyNamePrincipalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iamPolicyNamePrincipal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object iamPolicyUidPrincipal_ = ""; + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+     * resource is deleted and recreated with the same name, the binding will not
+     * be applicable to the new resource
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+     * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The iamPolicyUidPrincipal. + */ + public java.lang.String getIamPolicyUidPrincipal() { + java.lang.Object ref = iamPolicyUidPrincipal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamPolicyUidPrincipal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+     * resource is deleted and recreated with the same name, the binding will not
+     * be applicable to the new resource
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+     * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for iamPolicyUidPrincipal. + */ + public com.google.protobuf.ByteString getIamPolicyUidPrincipalBytes() { + java.lang.Object ref = iamPolicyUidPrincipal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamPolicyUidPrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+     * resource is deleted and recreated with the same name, the binding will not
+     * be applicable to the new resource
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+     * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The iamPolicyUidPrincipal to set. + * @return This builder for chaining. + */ + public Builder setIamPolicyUidPrincipal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicyUidPrincipal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+     * resource is deleted and recreated with the same name, the binding will not
+     * be applicable to the new resource
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+     * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIamPolicyUidPrincipal() { + iamPolicyUidPrincipal_ = getDefaultInstance().getIamPolicyUidPrincipal(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * IAM policy binding member referring to a Google Cloud resource by
+     * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+     * resource is deleted and recreated with the same name, the binding will not
+     * be applicable to the new resource
+     *
+     * Example:
+     * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+     * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for iamPolicyUidPrincipal to set. + * @return This builder for chaining. + */ + public Builder setIamPolicyUidPrincipalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iamPolicyUidPrincipal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.ResourcePolicyMember) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.ResourcePolicyMember) + private static final com.google.iam.v1.ResourcePolicyMember DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.ResourcePolicyMember(); + } + + public static com.google.iam.v1.ResourcePolicyMember getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourcePolicyMember parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.ResourcePolicyMember getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberOrBuilder.java new file mode 100644 index 000000000000..960af49e7c71 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/resource_policy_member.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface ResourcePolicyMemberOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.ResourcePolicyMember) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+   * and recreated with the same name, the binding will be applicable to the new
+   * resource.
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+   * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The iamPolicyNamePrincipal. + */ + java.lang.String getIamPolicyNamePrincipal(); + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * user-assigned name (https://google.aip.dev/122). If a resource is deleted
+   * and recreated with the same name, the binding will be applicable to the new
+   * resource.
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
+   * 
+ * + * string iam_policy_name_principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for iamPolicyNamePrincipal. + */ + com.google.protobuf.ByteString getIamPolicyNamePrincipalBytes(); + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+   * resource is deleted and recreated with the same name, the binding will not
+   * be applicable to the new resource
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+   * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The iamPolicyUidPrincipal. + */ + java.lang.String getIamPolicyUidPrincipal(); + + /** + * + * + *
+   * IAM policy binding member referring to a Google Cloud resource by
+   * system-assigned unique identifier (https://google.aip.dev/148#uid). If a
+   * resource is deleted and recreated with the same name, the binding will not
+   * be applicable to the new resource
+   *
+   * Example:
+   * `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
+   * 
+ * + * string iam_policy_uid_principal = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for iamPolicyUidPrincipal. + */ + com.google.protobuf.ByteString getIamPolicyUidPrincipalBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberProto.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberProto.java new file mode 100644 index 000000000000..59989125d251 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/ResourcePolicyMemberProto.java @@ -0,0 +1,90 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/resource_policy_member.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public final class ResourcePolicyMemberProto extends com.google.protobuf.GeneratedFile { + private ResourcePolicyMemberProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResourcePolicyMemberProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_ResourcePolicyMember_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_ResourcePolicyMember_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/iam/v1/resource_policy_member.p" + + "roto\022\rgoogle.iam.v1\032\037google/api/field_be" + + "havior.proto\"e\n\024ResourcePolicyMember\022&\n\031" + + "iam_policy_name_principal\030\001 \001(\tB\003\340A\003\022%\n\030" + + "iam_policy_uid_principal\030\002 \001(\tB\003\340A\003B\207\001\n\021" + + "com.google.iam.v1B\031ResourcePolicyMemberP" + + "rotoP\001Z)cloud.google.com/go/iam/apiv1/ia" + + "mpb;iampb\252\002\023Google.Cloud.Iam.V1\312\002\023Google" + + "\\Cloud\\Iam\\V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_iam_v1_ResourcePolicyMember_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v1_ResourcePolicyMember_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_ResourcePolicyMember_descriptor, + new java.lang.String[] { + "IamPolicyNamePrincipal", "IamPolicyUidPrincipal", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java new file mode 100644 index 000000000000..9264c879c6e1 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java @@ -0,0 +1,1257 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Request message for `SetIamPolicy` method.
+ * 
+ * + * Protobuf type {@code google.iam.v1.SetIamPolicyRequest} + */ +@com.google.protobuf.Generated +public final class SetIamPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.SetIamPolicyRequest) + SetIamPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SetIamPolicyRequest"); + } + + // Use SetIamPolicyRequest.newBuilder() to construct. + private SetIamPolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SetIamPolicyRequest() { + resource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.SetIamPolicyRequest.class, + com.google.iam.v1.SetIamPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being specified.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being specified.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 2; + private com.google.iam.v1.Policy policy_; + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getPolicy() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPolicy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.SetIamPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v1.SetIamPolicyRequest other = (com.google.iam.v1.SetIamPolicyRequest) obj; + + if (!getResource().equals(other.getResource())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.SetIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.SetIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `SetIamPolicy` method.
+   * 
+ * + * Protobuf type {@code google.iam.v1.SetIamPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.SetIamPolicyRequest) + com.google.iam.v1.SetIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.SetIamPolicyRequest.class, + com.google.iam.v1.SetIamPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v1.SetIamPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.SetIamPolicyRequest getDefaultInstanceForType() { + return com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.SetIamPolicyRequest build() { + com.google.iam.v1.SetIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.SetIamPolicyRequest buildPartial() { + com.google.iam.v1.SetIamPolicyRequest result = + new com.google.iam.v1.SetIamPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.SetIamPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.SetIamPolicyRequest) { + return mergeFrom((com.google.iam.v1.SetIamPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.SetIamPolicyRequest other) { + if (other == com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resource_ = ""; + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being specified.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being specified.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being specified.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being specified.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy is being specified.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.iam.v1.Policy policy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + policyBuilder_; + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + public com.google.iam.v1.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + } else { + policyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v1.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && policy_ != null + && policy_ != com.google.iam.v1.Policy.getDefaultInstance()) { + getPolicyBuilder().mergeFrom(value); + } else { + policy_ = value; + } + } else { + policyBuilder_.mergeFrom(value); + } + if (policy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v1.Policy.Builder getPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + } + + /** + * + * + *
+     * REQUIRED: The complete policy to be applied to the `resource`. The size of
+     * the policy is limited to a few 10s of KB. An empty policy is a
+     * valid policy but certain Cloud Platform services (such as Projects)
+     * might reject them.
+     * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + internalGetPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * 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"`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.SetIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.SetIamPolicyRequest) + private static final com.google.iam.v1.SetIamPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.SetIamPolicyRequest(); + } + + public static com.google.iam.v1.SetIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.SetIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..76f2b51296cc --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface SetIamPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.SetIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being specified.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * REQUIRED: The resource for which the policy is being specified.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + com.google.iam.v1.Policy getPolicy(); + + /** + * + * + *
+   * REQUIRED: The complete policy to be applied to the `resource`. The size of
+   * the policy is limited to a few 10s of KB. An empty policy is a
+   * valid policy but certain Cloud Platform services (such as Projects)
+   * might reject them.
+   * 
+ * + * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * 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"`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java new file mode 100644 index 000000000000..db888e16cf3b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java @@ -0,0 +1,945 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Request message for `TestIamPermissions` method.
+ * 
+ * + * Protobuf type {@code google.iam.v1.TestIamPermissionsRequest} + */ +@com.google.protobuf.Generated +public final class TestIamPermissionsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.TestIamPermissionsRequest) + TestIamPermissionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TestIamPermissionsRequest"); + } + + // Use TestIamPermissionsRequest.newBuilder() to construct. + private TestIamPermissionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TestIamPermissionsRequest() { + resource_ = ""; + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.TestIamPermissionsRequest.class, + com.google.iam.v1.TestIamPermissionsRequest.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * REQUIRED: The resource for which the policy detail is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * REQUIRED: The resource for which the policy detail is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList permissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + return permissions_; + } + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resource_); + } + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, permissions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resource_); + } + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.TestIamPermissionsRequest)) { + return super.equals(obj); + } + com.google.iam.v1.TestIamPermissionsRequest other = + (com.google.iam.v1.TestIamPermissionsRequest) obj; + + if (!getResource().equals(other.getResource())) return false; + if (!getPermissionsList().equals(other.getPermissionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.TestIamPermissionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `TestIamPermissions` method.
+   * 
+ * + * Protobuf type {@code google.iam.v1.TestIamPermissionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.TestIamPermissionsRequest) + com.google.iam.v1.TestIamPermissionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.TestIamPermissionsRequest.class, + com.google.iam.v1.TestIamPermissionsRequest.Builder.class); + } + + // Construct using com.google.iam.v1.TestIamPermissionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsRequest getDefaultInstanceForType() { + return com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsRequest build() { + com.google.iam.v1.TestIamPermissionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsRequest buildPartial() { + com.google.iam.v1.TestIamPermissionsRequest result = + new com.google.iam.v1.TestIamPermissionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.TestIamPermissionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + permissions_.makeImmutable(); + result.permissions_ = permissions_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.TestIamPermissionsRequest) { + return mergeFrom((com.google.iam.v1.TestIamPermissionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsRequest other) { + if (other == com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ |= 0x00000002; + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resource_ = ""; + + /** + * + * + *
+     * REQUIRED: The resource for which the policy detail is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy detail is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy detail is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy detail is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * REQUIRED: The resource for which the policy detail is being requested.
+     * See the operation documentation for the appropriate value for this field.
+     * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList permissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePermissionsIsMutable() { + if (!permissions_.isModifiable()) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + permissions_.makeImmutable(); + return permissions_; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions(java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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).
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.TestIamPermissionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsRequest) + private static final com.google.iam.v1.TestIamPermissionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.TestIamPermissionsRequest(); + } + + public static com.google.iam.v1.TestIamPermissionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestIamPermissionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java new file mode 100644 index 000000000000..c4a7d34fdb0a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface TestIamPermissionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.TestIamPermissionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * REQUIRED: The resource for which the policy detail is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * REQUIRED: The resource for which the policy detail is being requested.
+   * See the operation documentation for the appropriate value for this field.
+   * 
+ * + * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the permissions. + */ + java.util.List getPermissionsList(); + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of permissions. + */ + int getPermissionsCount(); + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + + /** + * + * + *
+   * 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).
+   * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString getPermissionsBytes(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java new file mode 100644 index 000000000000..afced79f37a2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java @@ -0,0 +1,709 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +/** + * + * + *
+ * Response message for `TestIamPermissions` method.
+ * 
+ * + * Protobuf type {@code google.iam.v1.TestIamPermissionsResponse} + */ +@com.google.protobuf.Generated +public final class TestIamPermissionsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.TestIamPermissionsResponse) + TestIamPermissionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TestIamPermissionsResponse"); + } + + // Use TestIamPermissionsResponse.newBuilder() to construct. + private TestIamPermissionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TestIamPermissionsResponse() { + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.TestIamPermissionsResponse.class, + com.google.iam.v1.TestIamPermissionsResponse.Builder.class); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList permissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + return permissions_; + } + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, permissions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.TestIamPermissionsResponse)) { + return super.equals(obj); + } + com.google.iam.v1.TestIamPermissionsResponse other = + (com.google.iam.v1.TestIamPermissionsResponse) obj; + + if (!getPermissionsList().equals(other.getPermissionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.TestIamPermissionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for `TestIamPermissions` method.
+   * 
+ * + * Protobuf type {@code google.iam.v1.TestIamPermissionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.TestIamPermissionsResponse) + com.google.iam.v1.TestIamPermissionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.TestIamPermissionsResponse.class, + com.google.iam.v1.TestIamPermissionsResponse.Builder.class); + } + + // Construct using com.google.iam.v1.TestIamPermissionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.IamPolicyProto + .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsResponse getDefaultInstanceForType() { + return com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsResponse build() { + com.google.iam.v1.TestIamPermissionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsResponse buildPartial() { + com.google.iam.v1.TestIamPermissionsResponse result = + new com.google.iam.v1.TestIamPermissionsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.TestIamPermissionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + permissions_.makeImmutable(); + result.permissions_ = permissions_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.TestIamPermissionsResponse) { + return mergeFrom((com.google.iam.v1.TestIamPermissionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsResponse other) { + if (other == com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance()) return this; + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ |= 0x00000001; + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList permissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePermissionsIsMutable() { + if (!permissions_.isModifiable()) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + permissions_.makeImmutable(); + return permissions_; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions(java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * A subset of `TestPermissionsRequest.permissions` that the caller is
+     * allowed.
+     * 
+ * + * repeated string permissions = 1; + * + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.TestIamPermissionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsResponse) + private static final com.google.iam.v1.TestIamPermissionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.TestIamPermissionsResponse(); + } + + public static com.google.iam.v1.TestIamPermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestIamPermissionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.TestIamPermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java new file mode 100644 index 000000000000..0d734608b4bf --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/iam_policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1; + +@com.google.protobuf.Generated +public interface TestIamPermissionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.TestIamPermissionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @return A list containing the permissions. + */ + java.util.List getPermissionsList(); + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @return The count of permissions. + */ + int getPermissionsCount(); + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + + /** + * + * + *
+   * A subset of `TestPermissionsRequest.permissions` that the caller is
+   * allowed.
+   * 
+ * + * repeated string permissions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString getPermissionsBytes(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditData.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditData.java new file mode 100644 index 000000000000..7648971de287 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditData.java @@ -0,0 +1,695 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/logging/audit_data.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1.logging; + +/** + * + * + *
+ * Audit log information specific to Cloud IAM. This message is serialized
+ * as an `Any` type in the `ServiceData` message of an
+ * `AuditLog` message.
+ * 
+ * + * Protobuf type {@code google.iam.v1.logging.AuditData} + */ +@com.google.protobuf.Generated +public final class AuditData extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v1.logging.AuditData) + AuditDataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuditData"); + } + + // Use AuditData.newBuilder() to construct. + private AuditData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuditData() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.logging.AuditDataProto + .internal_static_google_iam_v1_logging_AuditData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.logging.AuditDataProto + .internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.logging.AuditData.class, + com.google.iam.v1.logging.AuditData.Builder.class); + } + + private int bitField0_; + public static final int POLICY_DELTA_FIELD_NUMBER = 2; + private com.google.iam.v1.PolicyDelta policyDelta_; + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return Whether the policyDelta field is set. + */ + @java.lang.Override + public boolean hasPolicyDelta() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return The policyDelta. + */ + @java.lang.Override + public com.google.iam.v1.PolicyDelta getPolicyDelta() { + return policyDelta_ == null ? com.google.iam.v1.PolicyDelta.getDefaultInstance() : policyDelta_; + } + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + @java.lang.Override + public com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder() { + return policyDelta_ == null ? com.google.iam.v1.PolicyDelta.getDefaultInstance() : policyDelta_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPolicyDelta()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicyDelta()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v1.logging.AuditData)) { + return super.equals(obj); + } + com.google.iam.v1.logging.AuditData other = (com.google.iam.v1.logging.AuditData) obj; + + if (hasPolicyDelta() != other.hasPolicyDelta()) return false; + if (hasPolicyDelta()) { + if (!getPolicyDelta().equals(other.getPolicyDelta())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyDelta()) { + hash = (37 * hash) + POLICY_DELTA_FIELD_NUMBER; + hash = (53 * hash) + getPolicyDelta().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v1.logging.AuditData parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.logging.AuditData parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.logging.AuditData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v1.logging.AuditData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.logging.AuditData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v1.logging.AuditData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v1.logging.AuditData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v1.logging.AuditData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Audit log information specific to Cloud IAM. This message is serialized
+   * as an `Any` type in the `ServiceData` message of an
+   * `AuditLog` message.
+   * 
+ * + * Protobuf type {@code google.iam.v1.logging.AuditData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v1.logging.AuditData) + com.google.iam.v1.logging.AuditDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v1.logging.AuditDataProto + .internal_static_google_iam_v1_logging_AuditData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v1.logging.AuditDataProto + .internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v1.logging.AuditData.class, + com.google.iam.v1.logging.AuditData.Builder.class); + } + + // Construct using com.google.iam.v1.logging.AuditData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyDeltaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policyDelta_ = null; + if (policyDeltaBuilder_ != null) { + policyDeltaBuilder_.dispose(); + policyDeltaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v1.logging.AuditDataProto + .internal_static_google_iam_v1_logging_AuditData_descriptor; + } + + @java.lang.Override + public com.google.iam.v1.logging.AuditData getDefaultInstanceForType() { + return com.google.iam.v1.logging.AuditData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v1.logging.AuditData build() { + com.google.iam.v1.logging.AuditData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v1.logging.AuditData buildPartial() { + com.google.iam.v1.logging.AuditData result = new com.google.iam.v1.logging.AuditData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v1.logging.AuditData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyDelta_ = + policyDeltaBuilder_ == null ? policyDelta_ : policyDeltaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v1.logging.AuditData) { + return mergeFrom((com.google.iam.v1.logging.AuditData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v1.logging.AuditData other) { + if (other == com.google.iam.v1.logging.AuditData.getDefaultInstance()) return this; + if (other.hasPolicyDelta()) { + mergePolicyDelta(other.getPolicyDelta()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetPolicyDeltaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v1.PolicyDelta policyDelta_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.PolicyDelta, + com.google.iam.v1.PolicyDelta.Builder, + com.google.iam.v1.PolicyDeltaOrBuilder> + policyDeltaBuilder_; + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return Whether the policyDelta field is set. + */ + public boolean hasPolicyDelta() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return The policyDelta. + */ + public com.google.iam.v1.PolicyDelta getPolicyDelta() { + if (policyDeltaBuilder_ == null) { + return policyDelta_ == null + ? com.google.iam.v1.PolicyDelta.getDefaultInstance() + : policyDelta_; + } else { + return policyDeltaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) { + if (policyDeltaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyDelta_ = value; + } else { + policyDeltaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta.Builder builderForValue) { + if (policyDeltaBuilder_ == null) { + policyDelta_ = builderForValue.build(); + } else { + policyDeltaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public Builder mergePolicyDelta(com.google.iam.v1.PolicyDelta value) { + if (policyDeltaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policyDelta_ != null + && policyDelta_ != com.google.iam.v1.PolicyDelta.getDefaultInstance()) { + getPolicyDeltaBuilder().mergeFrom(value); + } else { + policyDelta_ = value; + } + } else { + policyDeltaBuilder_.mergeFrom(value); + } + if (policyDelta_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public Builder clearPolicyDelta() { + bitField0_ = (bitField0_ & ~0x00000001); + policyDelta_ = null; + if (policyDeltaBuilder_ != null) { + policyDeltaBuilder_.dispose(); + policyDeltaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public com.google.iam.v1.PolicyDelta.Builder getPolicyDeltaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPolicyDeltaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + public com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder() { + if (policyDeltaBuilder_ != null) { + return policyDeltaBuilder_.getMessageOrBuilder(); + } else { + return policyDelta_ == null + ? com.google.iam.v1.PolicyDelta.getDefaultInstance() + : policyDelta_; + } + } + + /** + * + * + *
+     * Policy delta between the original policy and the newly set policy.
+     * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.PolicyDelta, + com.google.iam.v1.PolicyDelta.Builder, + com.google.iam.v1.PolicyDeltaOrBuilder> + internalGetPolicyDeltaFieldBuilder() { + if (policyDeltaBuilder_ == null) { + policyDeltaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v1.PolicyDelta, + com.google.iam.v1.PolicyDelta.Builder, + com.google.iam.v1.PolicyDeltaOrBuilder>( + getPolicyDelta(), getParentForChildren(), isClean()); + policyDelta_ = null; + } + return policyDeltaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v1.logging.AuditData) + } + + // @@protoc_insertion_point(class_scope:google.iam.v1.logging.AuditData) + private static final com.google.iam.v1.logging.AuditData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v1.logging.AuditData(); + } + + public static com.google.iam.v1.logging.AuditData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v1.logging.AuditData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java new file mode 100644 index 000000000000..8ee1e058057c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/logging/audit_data.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1.logging; + +@com.google.protobuf.Generated +public interface AuditDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v1.logging.AuditData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return Whether the policyDelta field is set. + */ + boolean hasPolicyDelta(); + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + * + * @return The policyDelta. + */ + com.google.iam.v1.PolicyDelta getPolicyDelta(); + + /** + * + * + *
+   * Policy delta between the original policy and the newly set policy.
+   * 
+ * + * .google.iam.v1.PolicyDelta policy_delta = 2; + */ + com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java new file mode 100644 index 000000000000..d7c930b55cd5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java @@ -0,0 +1,83 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v1/logging/audit_data.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v1.logging; + +@com.google.protobuf.Generated +public final class AuditDataProto extends com.google.protobuf.GeneratedFile { + private AuditDataProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuditDataProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v1_logging_AuditData_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/iam/v1/logging/audit_data.proto" + + "\022\025google.iam.v1.logging\032\032google/iam/v1/p" + + "olicy.proto\"=\n\tAuditData\0220\n\014policy_delta" + + "\030\002 \001(\0132\032.google.iam.v1.PolicyDeltaB\206\001\n\031c" + + "om.google.iam.v1.loggingB\016AuditDataProto" + + "P\001Z9cloud.google.com/go/iam/apiv1/loggin" + + "g/loggingpb;loggingpb\252\002\033Google.Cloud.Iam" + + ".V1.Loggingb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.iam.v1.PolicyProto.getDescriptor(), + }); + internal_static_google_iam_v1_logging_AuditData_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v1_logging_AuditData_descriptor, + new java.lang.String[] { + "PolicyDelta", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.iam.v1.PolicyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/iam_policy.proto b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/iam_policy.proto new file mode 100644 index 000000000000..a123ab8411f8 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/iam_policy.proto @@ -0,0 +1,157 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/options.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V1"; +option go_package = "cloud.google.com/go/iam/apiv1/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "IamPolicyProto"; +option java_package = "com.google.iam.v1"; +option php_namespace = "Google\\Cloud\\Iam\\V1"; + +// API Overview +// +// Manages Identity and Access Management (IAM) policies. +// +// Any implementation of an API that offers access control features +// implements the google.iam.v1.IAMPolicy interface. +// +// ## Data model +// +// Access control is applied when a principal (user or service account), takes +// some action on a resource exposed by a service. Resources, identified by +// URI-like names, are the unit of access control specification. Service +// implementations can choose the granularity of access control and the +// supported permissions for their resources. +// For example one database service may allow access control to be +// specified only at the Table level, whereas another might allow access control +// to also be specified at the Column level. +// +// ## Policy Structure +// +// See google.iam.v1.Policy +// +// This is intentionally not a CRUD style API because access control policies +// are created and deleted implicitly with the resources to which they are +// attached. +service IAMPolicy { + option (google.api.default_host) = "iam-meta-api.googleapis.com"; + + // Sets the access control policy on the specified resource. Replaces any + // existing policy. + // + // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + rpc SetIamPolicy(SetIamPolicyRequest) returns (Policy) { + option (google.api.http) = { + post: "/v1/{resource=**}:setIamPolicy" + body: "*" + }; + } + + // Gets the access control policy for a resource. + // Returns an empty policy if the resource exists and does not have a policy + // set. + rpc GetIamPolicy(GetIamPolicyRequest) returns (Policy) { + option (google.api.http) = { + post: "/v1/{resource=**}:getIamPolicy" + body: "*" + }; + } + + // 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. + rpc TestIamPermissions(TestIamPermissionsRequest) + returns (TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=**}:testIamPermissions" + body: "*" + }; + } +} + +// Request message for `SetIamPolicy` method. +message SetIamPolicyRequest { + // REQUIRED: The resource for which the policy is being specified. + // See the operation documentation for the appropriate value for this field. + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*" + ]; + + // REQUIRED: The complete policy to be applied to the `resource`. The size of + // the policy is limited to a few 10s of KB. An empty policy is a + // valid policy but certain Cloud Platform services (such as Projects) + // might reject them. + Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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"` + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for `GetIamPolicy` method. +message GetIamPolicyRequest { + // REQUIRED: The resource for which the policy is being requested. + // See the operation documentation for the appropriate value for this field. + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*" + ]; + + // OPTIONAL: A `GetPolicyOptions` object for specifying options to + // `GetIamPolicy`. + GetPolicyOptions options = 2; +} + +// Request message for `TestIamPermissions` method. +message TestIamPermissionsRequest { + // REQUIRED: The resource for which the policy detail is being requested. + // See the operation documentation for the appropriate value for this field. + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "*" + ]; + + // 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). + repeated string permissions = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `TestIamPermissions` method. +message TestIamPermissionsResponse { + // A subset of `TestPermissionsRequest.permissions` that the caller is + // allowed. + repeated string permissions = 1; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/logging/audit_data.proto b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/logging/audit_data.proto new file mode 100644 index 000000000000..4952ef4e0898 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/logging/audit_data.proto @@ -0,0 +1,33 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v1.logging; + +import "google/iam/v1/policy.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V1.Logging"; +option go_package = "cloud.google.com/go/iam/apiv1/logging/loggingpb;loggingpb"; +option java_multiple_files = true; +option java_outer_classname = "AuditDataProto"; +option java_package = "com.google.iam.v1.logging"; + +// Audit log information specific to Cloud IAM. This message is serialized +// as an `Any` type in the `ServiceData` message of an +// `AuditLog` message. +message AuditData { + // Policy delta between the original policy and the newly set policy. + google.iam.v1.PolicyDelta policy_delta = 2; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/options.proto b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/options.proto new file mode 100644 index 000000000000..5337058794a7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/options.proto @@ -0,0 +1,48 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Iam.V1"; +option go_package = "cloud.google.com/go/iam/apiv1/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "OptionsProto"; +option java_package = "com.google.iam.v1"; +option php_namespace = "Google\\Cloud\\Iam\\V1"; + +// Encapsulates settings provided to GetIamPolicy. +message GetPolicyOptions { + // 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). + int32 requested_policy_version = 1; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/policy.proto b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/policy.proto new file mode 100644 index 000000000000..b5eac03c4427 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/policy.proto @@ -0,0 +1,410 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v1; + +import "google/type/expr.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Iam.V1"; +option go_package = "cloud.google.com/go/iam/apiv1/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.iam.v1"; +option php_namespace = "Google\\Cloud\\Iam\\V1"; + +// 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/). +message Policy { + // 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). + int32 version = 1; + + // 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`. + repeated Binding bindings = 4; + + // Specifies cloud audit logging configuration for this policy. + repeated AuditConfig audit_configs = 6; + + // `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. + bytes etag = 3; +} + +// Associates `members`, or principals, with a `role`. +message Binding { + // Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + string role = 1; + + // 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. + // + // * `user:{emailid}`: An email address that represents a specific Google + // account. For example, `alice@example.com` . + // + // + // * `serviceAccount:{emailid}`: An email address that represents a service + // account. For example, `my-other-app@appspot.gserviceaccount.com`. + // + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. + // + // * `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. + // + // + // * `domain:{domain}`: The G Suite domain (primary) that represents all the + // users of that domain. For example, `google.com` or `example.com`. + // + // + repeated string members = 2; + + // The condition that is associated with this binding. + // + // If the condition evaluates to `true`, then this binding applies to the + // current request. + // + // If the condition evaluates to `false`, then this binding does not apply to + // the current request. However, a different role binding might grant the same + // role to one or more of the principals in this binding. + // + // To learn which resources support conditions in their IAM policies, see the + // [IAM + // documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + google.type.Expr condition = 3; +} + +// 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. +message AuditConfig { + // 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. + string service = 1; + + // The configuration for logging of each type of permission. + repeated AuditLogConfig audit_log_configs = 3; +} + +// 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. +message AuditLogConfig { + // The list of valid permission types for which logging can be configured. + // Admin writes are always logged, and are not configurable. + enum LogType { + // Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0; + + // Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1; + + // Data writes. Example: CloudSQL Users create + DATA_WRITE = 2; + + // Data reads. Example: CloudSQL Users list + DATA_READ = 3; + } + + // The log type that this config enables. + LogType log_type = 1; + + // Specifies the identities that do not cause logging for this type of + // permission. + // Follows the same format of + // [Binding.members][google.iam.v1.Binding.members]. + repeated string exempted_members = 2; +} + +// The difference delta between two policies. +message PolicyDelta { + // The delta for Bindings between two policies. + repeated BindingDelta binding_deltas = 1; + + // The delta for AuditConfigs between two policies. + repeated AuditConfigDelta audit_config_deltas = 2; +} + +// One delta entry for Binding. Each individual change (only one member in each +// entry) to a binding will be a separate entry. +message BindingDelta { + // The type of action performed on a Binding in a policy. + enum Action { + // Unspecified. + ACTION_UNSPECIFIED = 0; + + // Addition of a Binding. + ADD = 1; + + // Removal of a Binding. + REMOVE = 2; + } + + // The action that was performed on a Binding. + // Required + Action action = 1; + + // Role that is assigned to `members`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // Required + string role = 2; + + // A single identity requesting access for a Google Cloud resource. + // Follows the same format of Binding.members. + // Required + string member = 3; + + // The condition that is associated with this binding. + google.type.Expr condition = 4; +} + +// One delta entry for AuditConfig. Each individual change (only one +// exempted_member in each entry) to a AuditConfig will be a separate entry. +message AuditConfigDelta { + // The type of action performed on an audit configuration in a policy. + enum Action { + // Unspecified. + ACTION_UNSPECIFIED = 0; + + // Addition of an audit configuration. + ADD = 1; + + // Removal of an audit configuration. + REMOVE = 2; + } + + // The action that was performed on an audit configuration in a policy. + // Required + Action action = 1; + + // Specifies a service that was configured for Cloud Audit Logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + // Required + string service = 2; + + // A single identity that is exempted from "data access" audit + // logging for the `service` specified above. + // Follows the same format of Binding.members. + string exempted_member = 3; + + // Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + // enabled, and cannot be configured. + // Required + string log_type = 4; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/resource_policy_member.proto b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/resource_policy_member.proto new file mode 100644 index 000000000000..16eefacec5bb --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v1/src/main/proto/google/iam/v1/resource_policy_member.proto @@ -0,0 +1,50 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V1"; +option go_package = "cloud.google.com/go/iam/apiv1/iampb;iampb"; +option php_namespace = "Google\\Cloud\\Iam\\V1"; +option java_multiple_files = true; +option java_outer_classname = "ResourcePolicyMemberProto"; +option java_package = "com.google.iam.v1"; + +// Output-only policy member strings of a Google Cloud resource's built-in +// identity. +message ResourcePolicyMember { + // IAM policy binding member referring to a Google Cloud resource by + // user-assigned name (https://google.aip.dev/122). If a resource is deleted + // and recreated with the same name, the binding will be applicable to the new + // resource. + // + // Example: + // `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter` + string iam_policy_name_principal = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // IAM policy binding member referring to a Google Cloud resource by + // system-assigned unique identifier (https://google.aip.dev/148#uid). If a + // resource is deleted and recreated with the same name, the binding will not + // be applicable to the new resource + // + // Example: + // `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5` + string iam_policy_uid_principal = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/pom.xml b/java-common-iam/proto-proto-google-iam-v1-v2/pom.xml new file mode 100644 index 000000000000..997098821b66 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2 + 1.65.0 + proto-proto-google-iam-v1-v2 + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java new file mode 100644 index 000000000000..55f171f6856f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Request message for `CreatePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.CreatePolicyRequest} + */ +@com.google.protobuf.Generated +public final class CreatePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.CreatePolicyRequest) + CreatePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePolicyRequest"); + } + + // Use CreatePolicyRequest.newBuilder() to construct. + private CreatePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePolicyRequest() { + parent_ = ""; + policyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.CreatePolicyRequest.class, + com.google.iam.v2.CreatePolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 2; + private com.google.iam.v2.Policy policy_; + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v2.Policy getPolicy() { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + + public static final int POLICY_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyId_ = ""; + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + @java.lang.Override + public java.lang.String getPolicyId() { + java.lang.Object ref = policyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyId_ = s; + return s; + } + } + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyIdBytes() { + java.lang.Object ref = policyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPolicy()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, policyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, policyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.CreatePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2.CreatePolicyRequest other = (com.google.iam.v2.CreatePolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (!getPolicyId().equals(other.getPolicyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.CreatePolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.CreatePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.CreatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.CreatePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `CreatePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.CreatePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.CreatePolicyRequest) + com.google.iam.v2.CreatePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.CreatePolicyRequest.class, + com.google.iam.v2.CreatePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2.CreatePolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + policyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.CreatePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2.CreatePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.CreatePolicyRequest build() { + com.google.iam.v2.CreatePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.CreatePolicyRequest buildPartial() { + com.google.iam.v2.CreatePolicyRequest result = + new com.google.iam.v2.CreatePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.CreatePolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyId_ = policyId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.CreatePolicyRequest) { + return mergeFrom((com.google.iam.v2.CreatePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.CreatePolicyRequest other) { + if (other == com.google.iam.v2.CreatePolicyRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (!other.getPolicyId().isEmpty()) { + policyId_ = other.policyId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + policyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.iam.v2.Policy policy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + policyBuilder_; + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + public com.google.iam.v2.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + } else { + policyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePolicy(com.google.iam.v2.Policy value) { + if (policyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && policy_ != null + && policy_ != com.google.iam.v2.Policy.getDefaultInstance()) { + getPolicyBuilder().mergeFrom(value); + } else { + policy_ = value; + } + } else { + policyBuilder_.mergeFrom(value); + } + if (policy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2.Policy.Builder getPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + internalGetPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private java.lang.Object policyId_ = ""; + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + public java.lang.String getPolicyId() { + java.lang.Object ref = policyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + public com.google.protobuf.ByteString getPolicyIdBytes() { + java.lang.Object ref = policyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @param value The policyId to set. + * @return This builder for chaining. + */ + public Builder setPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearPolicyId() { + policyId_ = getDefaultInstance().getPolicyId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @param value The bytes for policyId to set. + * @return This builder for chaining. + */ + public Builder setPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.CreatePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.CreatePolicyRequest) + private static final com.google.iam.v2.CreatePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.CreatePolicyRequest(); + } + + public static com.google.iam.v2.CreatePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.CreatePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..ddb052459e20 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface CreatePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.CreatePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + com.google.iam.v2.Policy getPolicy(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder(); + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + java.lang.String getPolicyId(); + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + com.google.protobuf.ByteString getPolicyIdBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java new file mode 100644 index 000000000000..8facb44ff7e6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java @@ -0,0 +1,880 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Request message for `DeletePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.DeletePolicyRequest} + */ +@com.google.protobuf.Generated +public final class DeletePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.DeletePolicyRequest) + DeletePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePolicyRequest"); + } + + // Use DeletePolicyRequest.newBuilder() to construct. + private DeletePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePolicyRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.DeletePolicyRequest.class, + com.google.iam.v2.DeletePolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.DeletePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2.DeletePolicyRequest other = (com.google.iam.v2.DeletePolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.DeletePolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DeletePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DeletePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.DeletePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `DeletePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.DeletePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.DeletePolicyRequest) + com.google.iam.v2.DeletePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.DeletePolicyRequest.class, + com.google.iam.v2.DeletePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2.DeletePolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.DeletePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2.DeletePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.DeletePolicyRequest build() { + com.google.iam.v2.DeletePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.DeletePolicyRequest buildPartial() { + com.google.iam.v2.DeletePolicyRequest result = + new com.google.iam.v2.DeletePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.DeletePolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.DeletePolicyRequest) { + return mergeFrom((com.google.iam.v2.DeletePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.DeletePolicyRequest other) { + if (other == com.google.iam.v2.DeletePolicyRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.DeletePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.DeletePolicyRequest) + private static final com.google.iam.v2.DeletePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.DeletePolicyRequest(); + } + + public static com.google.iam.v2.DeletePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.DeletePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..1e845fe6d0fc --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface DeletePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.DeletePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRule.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRule.java new file mode 100644 index 000000000000..329617f3123d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRule.java @@ -0,0 +1,2675 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * A deny rule in an IAM deny policy.
+ * 
+ * + * Protobuf type {@code google.iam.v2.DenyRule} + */ +@com.google.protobuf.Generated +public final class DenyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.DenyRule) + DenyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DenyRule"); + } + + // Use DenyRule.newBuilder() to construct. + private DenyRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DenyRule() { + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.DenyRule.class, com.google.iam.v2.DenyRule.Builder.class); + } + + private int bitField0_; + public static final int DENIED_PRINCIPALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList deniedPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { + return deniedPrincipals_; + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + public int getDeniedPrincipalsCount() { + return deniedPrincipals_.size(); + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + public java.lang.String getDeniedPrincipals(int index) { + return deniedPrincipals_.get(index); + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { + return deniedPrincipals_.getByteString(index); + } + + public static final int EXCEPTION_PRINCIPALS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList exceptionPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { + return exceptionPrincipals_; + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + public int getExceptionPrincipalsCount() { + return exceptionPrincipals_.size(); + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + public java.lang.String getExceptionPrincipals(int index) { + return exceptionPrincipals_.get(index); + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { + return exceptionPrincipals_.getByteString(index); + } + + public static final int DENIED_PERMISSIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList deniedPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { + return deniedPermissions_; + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + public int getDeniedPermissionsCount() { + return deniedPermissions_.size(); + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + public java.lang.String getDeniedPermissions(int index) { + return deniedPermissions_.get(index); + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { + return deniedPermissions_.getByteString(index); + } + + public static final int EXCEPTION_PERMISSIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList exceptionPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { + return exceptionPermissions_; + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + public int getExceptionPermissionsCount() { + return exceptionPermissions_.size(); + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + public java.lang.String getExceptionPermissions(int index) { + return exceptionPermissions_.get(index); + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { + return exceptionPermissions_.getByteString(index); + } + + public static final int DENIAL_CONDITION_FIELD_NUMBER = 5; + private com.google.type.Expr denialCondition_; + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + @java.lang.Override + public boolean hasDenialCondition() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + @java.lang.Override + public com.google.type.Expr getDenialCondition() { + return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; + } + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { + return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deniedPrincipals_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, deniedPrincipals_.getRaw(i)); + } + for (int i = 0; i < exceptionPrincipals_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, exceptionPrincipals_.getRaw(i)); + } + for (int i = 0; i < deniedPermissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, deniedPermissions_.getRaw(i)); + } + for (int i = 0; i < exceptionPermissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, exceptionPermissions_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getDenialCondition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < deniedPrincipals_.size(); i++) { + dataSize += computeStringSizeNoTag(deniedPrincipals_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeniedPrincipalsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exceptionPrincipals_.size(); i++) { + dataSize += computeStringSizeNoTag(exceptionPrincipals_.getRaw(i)); + } + size += dataSize; + size += 1 * getExceptionPrincipalsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < deniedPermissions_.size(); i++) { + dataSize += computeStringSizeNoTag(deniedPermissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeniedPermissionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exceptionPermissions_.size(); i++) { + dataSize += computeStringSizeNoTag(exceptionPermissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getExceptionPermissionsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.DenyRule)) { + return super.equals(obj); + } + com.google.iam.v2.DenyRule other = (com.google.iam.v2.DenyRule) obj; + + if (!getDeniedPrincipalsList().equals(other.getDeniedPrincipalsList())) return false; + if (!getExceptionPrincipalsList().equals(other.getExceptionPrincipalsList())) return false; + if (!getDeniedPermissionsList().equals(other.getDeniedPermissionsList())) return false; + if (!getExceptionPermissionsList().equals(other.getExceptionPermissionsList())) return false; + if (hasDenialCondition() != other.hasDenialCondition()) return false; + if (hasDenialCondition()) { + if (!getDenialCondition().equals(other.getDenialCondition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeniedPrincipalsCount() > 0) { + hash = (37 * hash) + DENIED_PRINCIPALS_FIELD_NUMBER; + hash = (53 * hash) + getDeniedPrincipalsList().hashCode(); + } + if (getExceptionPrincipalsCount() > 0) { + hash = (37 * hash) + EXCEPTION_PRINCIPALS_FIELD_NUMBER; + hash = (53 * hash) + getExceptionPrincipalsList().hashCode(); + } + if (getDeniedPermissionsCount() > 0) { + hash = (37 * hash) + DENIED_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDeniedPermissionsList().hashCode(); + } + if (getExceptionPermissionsCount() > 0) { + hash = (37 * hash) + EXCEPTION_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExceptionPermissionsList().hashCode(); + } + if (hasDenialCondition()) { + hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getDenialCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.DenyRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DenyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DenyRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DenyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DenyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.DenyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.DenyRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DenyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.DenyRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DenyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.DenyRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.DenyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.DenyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A deny rule in an IAM deny policy.
+   * 
+ * + * Protobuf type {@code google.iam.v2.DenyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.DenyRule) + com.google.iam.v2.DenyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.DenyRuleProto + .internal_static_google_iam_v2_DenyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.DenyRule.class, com.google.iam.v2.DenyRule.Builder.class); + } + + // Construct using com.google.iam.v2.DenyRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDenialConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + denialCondition_ = null; + if (denialConditionBuilder_ != null) { + denialConditionBuilder_.dispose(); + denialConditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.DenyRule getDefaultInstanceForType() { + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.DenyRule build() { + com.google.iam.v2.DenyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.DenyRule buildPartial() { + com.google.iam.v2.DenyRule result = new com.google.iam.v2.DenyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.DenyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + deniedPrincipals_.makeImmutable(); + result.deniedPrincipals_ = deniedPrincipals_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + exceptionPrincipals_.makeImmutable(); + result.exceptionPrincipals_ = exceptionPrincipals_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + deniedPermissions_.makeImmutable(); + result.deniedPermissions_ = deniedPermissions_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + exceptionPermissions_.makeImmutable(); + result.exceptionPermissions_ = exceptionPermissions_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.denialCondition_ = + denialConditionBuilder_ == null ? denialCondition_ : denialConditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.DenyRule) { + return mergeFrom((com.google.iam.v2.DenyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.DenyRule other) { + if (other == com.google.iam.v2.DenyRule.getDefaultInstance()) return this; + if (!other.deniedPrincipals_.isEmpty()) { + if (deniedPrincipals_.isEmpty()) { + deniedPrincipals_ = other.deniedPrincipals_; + bitField0_ |= 0x00000001; + } else { + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.addAll(other.deniedPrincipals_); + } + onChanged(); + } + if (!other.exceptionPrincipals_.isEmpty()) { + if (exceptionPrincipals_.isEmpty()) { + exceptionPrincipals_ = other.exceptionPrincipals_; + bitField0_ |= 0x00000002; + } else { + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.addAll(other.exceptionPrincipals_); + } + onChanged(); + } + if (!other.deniedPermissions_.isEmpty()) { + if (deniedPermissions_.isEmpty()) { + deniedPermissions_ = other.deniedPermissions_; + bitField0_ |= 0x00000004; + } else { + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.addAll(other.deniedPermissions_); + } + onChanged(); + } + if (!other.exceptionPermissions_.isEmpty()) { + if (exceptionPermissions_.isEmpty()) { + exceptionPermissions_ = other.exceptionPermissions_; + bitField0_ |= 0x00000008; + } else { + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.addAll(other.exceptionPermissions_); + } + onChanged(); + } + if (other.hasDenialCondition()) { + mergeDenialCondition(other.getDenialCondition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDenialConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList deniedPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDeniedPrincipalsIsMutable() { + if (!deniedPrincipals_.isModifiable()) { + deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(deniedPrincipals_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { + deniedPrincipals_.makeImmutable(); + return deniedPrincipals_; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + public int getDeniedPrincipalsCount() { + return deniedPrincipals_.size(); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + public java.lang.String getDeniedPrincipals(int index) { + return deniedPrincipals_.get(index); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { + return deniedPrincipals_.getByteString(index); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index to set the value at. + * @param value The deniedPrincipals to set. + * @return This builder for chaining. + */ + public Builder setDeniedPrincipals(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param value The deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addDeniedPrincipals(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param values The deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addAllDeniedPrincipals(java.lang.Iterable values) { + ensureDeniedPrincipalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPrincipals_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return This builder for chaining. + */ + public Builder clearDeniedPrincipals() { + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param value The bytes of the deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addDeniedPrincipalsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList exceptionPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExceptionPrincipalsIsMutable() { + if (!exceptionPrincipals_.isModifiable()) { + exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(exceptionPrincipals_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { + exceptionPrincipals_.makeImmutable(); + return exceptionPrincipals_; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + public int getExceptionPrincipalsCount() { + return exceptionPrincipals_.size(); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + public java.lang.String getExceptionPrincipals(int index) { + return exceptionPrincipals_.get(index); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { + return exceptionPrincipals_.getByteString(index); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index to set the value at. + * @param value The exceptionPrincipals to set. + * @return This builder for chaining. + */ + public Builder setExceptionPrincipals(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param value The exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addExceptionPrincipals(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param values The exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addAllExceptionPrincipals(java.lang.Iterable values) { + ensureExceptionPrincipalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPrincipals_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return This builder for chaining. + */ + public Builder clearExceptionPrincipals() { + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param value The bytes of the exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addExceptionPrincipalsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList deniedPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDeniedPermissionsIsMutable() { + if (!deniedPermissions_.isModifiable()) { + deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(deniedPermissions_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { + deniedPermissions_.makeImmutable(); + return deniedPermissions_; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + public int getDeniedPermissionsCount() { + return deniedPermissions_.size(); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + public java.lang.String getDeniedPermissions(int index) { + return deniedPermissions_.get(index); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { + return deniedPermissions_.getByteString(index); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index to set the value at. + * @param value The deniedPermissions to set. + * @return This builder for chaining. + */ + public Builder setDeniedPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param value The deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addDeniedPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param values The deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addAllDeniedPermissions(java.lang.Iterable values) { + ensureDeniedPermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPermissions_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeniedPermissions() { + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param value The bytes of the deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addDeniedPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList exceptionPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExceptionPermissionsIsMutable() { + if (!exceptionPermissions_.isModifiable()) { + exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(exceptionPermissions_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { + exceptionPermissions_.makeImmutable(); + return exceptionPermissions_; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + public int getExceptionPermissionsCount() { + return exceptionPermissions_.size(); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + public java.lang.String getExceptionPermissions(int index) { + return exceptionPermissions_.get(index); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { + return exceptionPermissions_.getByteString(index); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index to set the value at. + * @param value The exceptionPermissions to set. + * @return This builder for chaining. + */ + public Builder setExceptionPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param value The exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addExceptionPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param values The exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addAllExceptionPermissions(java.lang.Iterable values) { + ensureExceptionPermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPermissions_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return This builder for chaining. + */ + public Builder clearExceptionPermissions() { + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param value The bytes of the exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addExceptionPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.type.Expr denialCondition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + denialConditionBuilder_; + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + public boolean hasDenialCondition() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + public com.google.type.Expr getDenialCondition() { + if (denialConditionBuilder_ == null) { + return denialCondition_ == null + ? com.google.type.Expr.getDefaultInstance() + : denialCondition_; + } else { + return denialConditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder setDenialCondition(com.google.type.Expr value) { + if (denialConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + denialCondition_ = value; + } else { + denialConditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder setDenialCondition(com.google.type.Expr.Builder builderForValue) { + if (denialConditionBuilder_ == null) { + denialCondition_ = builderForValue.build(); + } else { + denialConditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder mergeDenialCondition(com.google.type.Expr value) { + if (denialConditionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && denialCondition_ != null + && denialCondition_ != com.google.type.Expr.getDefaultInstance()) { + getDenialConditionBuilder().mergeFrom(value); + } else { + denialCondition_ = value; + } + } else { + denialConditionBuilder_.mergeFrom(value); + } + if (denialCondition_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder clearDenialCondition() { + bitField0_ = (bitField0_ & ~0x00000010); + denialCondition_ = null; + if (denialConditionBuilder_ != null) { + denialConditionBuilder_.dispose(); + denialConditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public com.google.type.Expr.Builder getDenialConditionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetDenialConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { + if (denialConditionBuilder_ != null) { + return denialConditionBuilder_.getMessageOrBuilder(); + } else { + return denialCondition_ == null + ? com.google.type.Expr.getDefaultInstance() + : denialCondition_; + } + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetDenialConditionFieldBuilder() { + if (denialConditionBuilder_ == null) { + denialConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getDenialCondition(), getParentForChildren(), isClean()); + denialCondition_ = null; + } + return denialConditionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.DenyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.DenyRule) + private static final com.google.iam.v2.DenyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.DenyRule(); + } + + public static com.google.iam.v2.DenyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DenyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.DenyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java new file mode 100644 index 000000000000..1f14f99ffdec --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java @@ -0,0 +1,531 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface DenyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.DenyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + java.util.List getDeniedPrincipalsList(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + int getDeniedPrincipalsCount(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + java.lang.String getDeniedPrincipals(int index); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + java.util.List getExceptionPrincipalsList(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + int getExceptionPrincipalsCount(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + java.lang.String getExceptionPrincipals(int index); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + java.util.List getDeniedPermissionsList(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + int getDeniedPermissionsCount(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + java.lang.String getDeniedPermissions(int index); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + com.google.protobuf.ByteString getDeniedPermissionsBytes(int index); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + java.util.List getExceptionPermissionsList(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + int getExceptionPermissionsCount(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + java.lang.String getExceptionPermissions(int index); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + com.google.protobuf.ByteString getExceptionPermissionsBytes(int index); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + boolean hasDenialCondition(); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + com.google.type.Expr getDenialCondition(); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + */ + com.google.type.ExprOrBuilder getDenialConditionOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java new file mode 100644 index 000000000000..bccd683a8d8a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public final class DenyRuleProto extends com.google.protobuf.GeneratedFile { + private DenyRuleProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DenyRuleProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_DenyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_DenyRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\030google/iam/v2/deny.proto\022\rgoogle.iam.v" + + "2\032\026google/type/expr.proto\"\253\001\n\010DenyRule\022\031" + + "\n\021denied_principals\030\001 \003(\t\022\034\n\024exception_p" + + "rincipals\030\002 \003(\t\022\032\n\022denied_permissions\030\003 " + + "\003(\t\022\035\n\025exception_permissions\030\004 \003(\t\022+\n\020de" + + "nial_condition\030\005 \001(\0132\021.google.type.ExprB" + + "{\n\021com.google.iam.v2B\rDenyRuleProtoP\001Z)c" + + "loud.google.com/go/iam/apiv2/iampb;iampb" + + "\252\002\023Google.Cloud.Iam.V2\312\002\023Google\\Cloud\\Ia" + + "m\\V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v2_DenyRule_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v2_DenyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_DenyRule_descriptor, + new java.lang.String[] { + "DeniedPrincipals", + "ExceptionPrincipals", + "DeniedPermissions", + "ExceptionPermissions", + "DenialCondition", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.type.ExprProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java new file mode 100644 index 000000000000..77e35ede9aa7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Request message for `GetPolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.GetPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.GetPolicyRequest) + GetPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyRequest"); + } + + // Use GetPolicyRequest.newBuilder() to construct. + private GetPolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.GetPolicyRequest.class, + com.google.iam.v2.GetPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.GetPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2.GetPolicyRequest other = (com.google.iam.v2.GetPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.GetPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.GetPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.GetPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.GetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `GetPolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.GetPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.GetPolicyRequest) + com.google.iam.v2.GetPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.GetPolicyRequest.class, + com.google.iam.v2.GetPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2.GetPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_GetPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.GetPolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2.GetPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.GetPolicyRequest build() { + com.google.iam.v2.GetPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.GetPolicyRequest buildPartial() { + com.google.iam.v2.GetPolicyRequest result = new com.google.iam.v2.GetPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.GetPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.GetPolicyRequest) { + return mergeFrom((com.google.iam.v2.GetPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.GetPolicyRequest other) { + if (other == com.google.iam.v2.GetPolicyRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.GetPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.GetPolicyRequest) + private static final com.google.iam.v2.GetPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.GetPolicyRequest(); + } + + public static com.google.iam.v2.GetPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.GetPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..2722c9583080 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface GetPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.GetPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java new file mode 100644 index 000000000000..021f6200f499 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java @@ -0,0 +1,967 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Request message for `ListPolicies`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.ListPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListPoliciesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.ListPoliciesRequest) + ListPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPoliciesRequest"); + } + + // Use ListPoliciesRequest.newBuilder() to construct. + private ListPoliciesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.ListPoliciesRequest.class, + com.google.iam.v2.ListPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of policies to return. IAM ignores this value and uses
+   * the value 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.ListPoliciesRequest)) { + return super.equals(obj); + } + com.google.iam.v2.ListPoliciesRequest other = (com.google.iam.v2.ListPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.ListPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `ListPolicies`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.ListPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.ListPoliciesRequest) + com.google.iam.v2.ListPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.ListPoliciesRequest.class, + com.google.iam.v2.ListPoliciesRequest.Builder.class); + } + + // Construct using com.google.iam.v2.ListPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesRequest getDefaultInstanceForType() { + return com.google.iam.v2.ListPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesRequest build() { + com.google.iam.v2.ListPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesRequest buildPartial() { + com.google.iam.v2.ListPoliciesRequest result = + new com.google.iam.v2.ListPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.ListPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.ListPoliciesRequest) { + return mergeFrom((com.google.iam.v2.ListPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.ListPoliciesRequest other) { + if (other == com.google.iam.v2.ListPoliciesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.ListPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.ListPoliciesRequest) + private static final com.google.iam.v2.ListPoliciesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.ListPoliciesRequest(); + } + + public static com.google.iam.v2.ListPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..7b70a5b6464f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface ListPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.ListPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of policies to return. IAM ignores this value and uses
+   * the value 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java new file mode 100644 index 000000000000..1363c6b6b716 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java @@ -0,0 +1,1107 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Response message for `ListPolicies`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.ListPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListPoliciesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.ListPoliciesResponse) + ListPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPoliciesResponse"); + } + + // Use ListPoliciesResponse.newBuilder() to construct. + private ListPoliciesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPoliciesResponse() { + policies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.ListPoliciesResponse.class, + com.google.iam.v2.ListPoliciesResponse.Builder.class); + } + + public static final int POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policies_; + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + @java.lang.Override + public java.util.List getPoliciesList() { + return policies_; + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + @java.lang.Override + public java.util.List getPoliciesOrBuilderList() { + return policies_; + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + @java.lang.Override + public int getPoliciesCount() { + return policies_.size(); + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + @java.lang.Override + public com.google.iam.v2.Policy getPolicies(int index) { + return policies_.get(index); + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + @java.lang.Override + public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { + return policies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policies_.size(); i++) { + output.writeMessage(1, policies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.ListPoliciesResponse)) { + return super.equals(obj); + } + com.google.iam.v2.ListPoliciesResponse other = (com.google.iam.v2.ListPoliciesResponse) obj; + + if (!getPoliciesList().equals(other.getPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPoliciesCount() > 0) { + hash = (37 * hash) + POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.ListPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.ListPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for `ListPolicies`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.ListPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.ListPoliciesResponse) + com.google.iam.v2.ListPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.ListPoliciesResponse.class, + com.google.iam.v2.ListPoliciesResponse.Builder.class); + } + + // Construct using com.google.iam.v2.ListPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + } else { + policies_ = null; + policiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesResponse getDefaultInstanceForType() { + return com.google.iam.v2.ListPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesResponse build() { + com.google.iam.v2.ListPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesResponse buildPartial() { + com.google.iam.v2.ListPoliciesResponse result = + new com.google.iam.v2.ListPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v2.ListPoliciesResponse result) { + if (policiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policies_ = java.util.Collections.unmodifiableList(policies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policies_ = policies_; + } else { + result.policies_ = policiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v2.ListPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.ListPoliciesResponse) { + return mergeFrom((com.google.iam.v2.ListPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.ListPoliciesResponse other) { + if (other == com.google.iam.v2.ListPoliciesResponse.getDefaultInstance()) return this; + if (policiesBuilder_ == null) { + if (!other.policies_.isEmpty()) { + if (policies_.isEmpty()) { + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePoliciesIsMutable(); + policies_.addAll(other.policies_); + } + onChanged(); + } + } else { + if (!other.policies_.isEmpty()) { + if (policiesBuilder_.isEmpty()) { + policiesBuilder_.dispose(); + policiesBuilder_ = null; + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + policiesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPoliciesFieldBuilder() + : null; + } else { + policiesBuilder_.addAllMessages(other.policies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v2.Policy m = + input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policies_ = java.util.Collections.emptyList(); + + private void ensurePoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policies_ = new java.util.ArrayList(policies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + policiesBuilder_; + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public java.util.List getPoliciesList() { + if (policiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(policies_); + } else { + return policiesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public int getPoliciesCount() { + if (policiesBuilder_ == null) { + return policies_.size(); + } else { + return policiesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public com.google.iam.v2.Policy getPolicies(int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); + } else { + return policiesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder setPolicies(int index, com.google.iam.v2.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.set(index, value); + onChanged(); + } else { + policiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder setPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.set(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder addPolicies(com.google.iam.v2.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(value); + onChanged(); + } else { + policiesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder addPolicies(int index, com.google.iam.v2.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(index, value); + onChanged(); + } else { + policiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder addPolicies(com.google.iam.v2.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder addPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder addAllPolicies(java.lang.Iterable values) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); + onChanged(); + } else { + policiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder clearPolicies() { + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public Builder removePolicies(int index) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.remove(index); + onChanged(); + } else { + policiesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public com.google.iam.v2.Policy.Builder getPoliciesBuilder(int index) { + return internalGetPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); + } else { + return policiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public java.util.List getPoliciesOrBuilderList() { + if (policiesBuilder_ != null) { + return policiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policies_); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public com.google.iam.v2.Policy.Builder addPoliciesBuilder() { + return internalGetPoliciesFieldBuilder() + .addBuilder(com.google.iam.v2.Policy.getDefaultInstance()); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public com.google.iam.v2.Policy.Builder addPoliciesBuilder(int index) { + return internalGetPoliciesFieldBuilder() + .addBuilder(index, com.google.iam.v2.Policy.getDefaultInstance()); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + public java.util.List getPoliciesBuilderList() { + return internalGetPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + internalGetPoliciesFieldBuilder() { + if (policiesBuilder_ == null) { + policiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder>( + policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policies_ = null; + } + return policiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.ListPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.ListPoliciesResponse) + private static final com.google.iam.v2.ListPoliciesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.ListPoliciesResponse(); + } + + public static com.google.iam.v2.ListPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.ListPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..18c09d49f110 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface ListPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.ListPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + java.util.List getPoliciesList(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + com.google.iam.v2.Policy getPolicies(int index); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + int getPoliciesCount(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + java.util.List getPoliciesOrBuilderList(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2.Policy policies = 1; + */ + com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index); + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/Policy.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/Policy.java new file mode 100644 index 000000000000..6e70a6d85523 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/Policy.java @@ -0,0 +1,3462 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Data for an IAM policy.
+ * 
+ * + * Protobuf type {@code google.iam.v2.Policy} + */ +@com.google.protobuf.Generated +public final class Policy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.Policy) + PolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Policy"); + } + + // Use Policy.newBuilder() to construct. + private Policy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Policy() { + name_ = ""; + uid_ = ""; + kind_ = ""; + displayName_ = ""; + etag_ = ""; + rules_ = java.util.Collections.emptyList(); + managingAuthority_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.Policy.class, com.google.iam.v2.Policy.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int RULES_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List rules_; + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + @java.lang.Override + public java.util.List getRulesOrBuilderList() { + return rules_; + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + @java.lang.Override + public com.google.iam.v2.PolicyRule getRules(int index) { + return rules_.get(index); + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + @java.lang.Override + public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int MANAGING_AUTHORITY_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object managingAuthority_ = ""; + + /** + * + * + *
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
+   * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The managingAuthority. + */ + @java.lang.Override + public java.lang.String getManagingAuthority() { + java.lang.Object ref = managingAuthority_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + managingAuthority_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
+   * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for managingAuthority. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManagingAuthorityBytes() { + java.lang.Object ref = managingAuthority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + managingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, etag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getDeleteTime()); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(10, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(managingAuthority_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, managingAuthority_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, etag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeleteTime()); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(managingAuthority_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, managingAuthority_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.Policy)) { + return super.equals(obj); + } + com.google.iam.v2.Policy other = (com.google.iam.v2.Policy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getManagingAuthority().equals(other.getManagingAuthority())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + MANAGING_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getManagingAuthority().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.Policy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.Policy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.Policy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.Policy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.Policy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.Policy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.Policy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.Policy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.Policy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.Policy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.Policy parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.Policy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.Policy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Data for an IAM policy.
+   * 
+ * + * Protobuf type {@code google.iam.v2.Policy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.Policy) + com.google.iam.v2.PolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.Policy.class, com.google.iam.v2.Policy.Builder.class); + } + + // Construct using com.google.iam.v2.Policy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); + internalGetRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + kind_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + etag_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + managingAuthority_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.Policy getDefaultInstanceForType() { + return com.google.iam.v2.Policy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.Policy build() { + com.google.iam.v2.Policy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.Policy buildPartial() { + com.google.iam.v2.Policy result = new com.google.iam.v2.Policy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v2.Policy result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v2.Policy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.etag_ = etag_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.managingAuthority_ = managingAuthority_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.Policy) { + return mergeFrom((com.google.iam.v2.Policy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.Policy other) { + if (other == com.google.iam.v2.Policy.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000200); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getManagingAuthority().isEmpty()) { + managingAuthority_ = other.managingAuthority_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.iam.v2.PolicyRule m = + input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + managingAuthority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000100); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private java.util.List rules_ = java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.PolicyRule, + com.google.iam.v2.PolicyRule.Builder, + com.google.iam.v2.PolicyRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public com.google.iam.v2.PolicyRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder setRules(int index, com.google.iam.v2.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder setRules(int index, com.google.iam.v2.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder addRules(com.google.iam.v2.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder addRules(int index, com.google.iam.v2.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder addRules(com.google.iam.v2.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder addRules(int index, com.google.iam.v2.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder addAllRules(java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public com.google.iam.v2.PolicyRule.Builder getRulesBuilder(int index) { + return internalGetRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public java.util.List getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public com.google.iam.v2.PolicyRule.Builder addRulesBuilder() { + return internalGetRulesFieldBuilder() + .addBuilder(com.google.iam.v2.PolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public com.google.iam.v2.PolicyRule.Builder addRulesBuilder(int index) { + return internalGetRulesFieldBuilder() + .addBuilder(index, com.google.iam.v2.PolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + public java.util.List getRulesBuilderList() { + return internalGetRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.PolicyRule, + com.google.iam.v2.PolicyRule.Builder, + com.google.iam.v2.PolicyRuleOrBuilder> + internalGetRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2.PolicyRule, + com.google.iam.v2.PolicyRule.Builder, + com.google.iam.v2.PolicyRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object managingAuthority_ = ""; + + /** + * + * + *
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
+     * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The managingAuthority. + */ + public java.lang.String getManagingAuthority() { + java.lang.Object ref = managingAuthority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + managingAuthority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
+     * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for managingAuthority. + */ + public com.google.protobuf.ByteString getManagingAuthorityBytes() { + java.lang.Object ref = managingAuthority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + managingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
+     * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The managingAuthority to set. + * @return This builder for chaining. + */ + public Builder setManagingAuthority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + managingAuthority_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
+     * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearManagingAuthority() { + managingAuthority_ = getDefaultInstance().getManagingAuthority(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
+     * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for managingAuthority to set. + * @return This builder for chaining. + */ + public Builder setManagingAuthorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + managingAuthority_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.Policy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.Policy) + private static final com.google.iam.v2.Policy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.Policy(); + } + + public static com.google.iam.v2.Policy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Policy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.Policy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java new file mode 100644 index 000000000000..a203917fffdf --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java @@ -0,0 +1,693 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Metadata for long-running `Policy` operations.
+ * 
+ * + * Protobuf type {@code google.iam.v2.PolicyOperationMetadata} + */ +@com.google.protobuf.Generated +public final class PolicyOperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.PolicyOperationMetadata) + PolicyOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyOperationMetadata"); + } + + // Use PolicyOperationMetadata.newBuilder() to construct. + private PolicyOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.PolicyOperationMetadata.class, + com.google.iam.v2.PolicyOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.PolicyOperationMetadata)) { + return super.equals(obj); + } + com.google.iam.v2.PolicyOperationMetadata other = + (com.google.iam.v2.PolicyOperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.PolicyOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for long-running `Policy` operations.
+   * 
+ * + * Protobuf type {@code google.iam.v2.PolicyOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.PolicyOperationMetadata) + com.google.iam.v2.PolicyOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.PolicyOperationMetadata.class, + com.google.iam.v2.PolicyOperationMetadata.Builder.class); + } + + // Construct using com.google.iam.v2.PolicyOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.PolicyOperationMetadata getDefaultInstanceForType() { + return com.google.iam.v2.PolicyOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.PolicyOperationMetadata build() { + com.google.iam.v2.PolicyOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.PolicyOperationMetadata buildPartial() { + com.google.iam.v2.PolicyOperationMetadata result = + new com.google.iam.v2.PolicyOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.PolicyOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.PolicyOperationMetadata) { + return mergeFrom((com.google.iam.v2.PolicyOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.PolicyOperationMetadata other) { + if (other == com.google.iam.v2.PolicyOperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.PolicyOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.PolicyOperationMetadata) + private static final com.google.iam.v2.PolicyOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.PolicyOperationMetadata(); + } + + public static com.google.iam.v2.PolicyOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.PolicyOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..fcfe2c7ab2a2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface PolicyOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.PolicyOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java new file mode 100644 index 000000000000..c9b204a7acf8 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java @@ -0,0 +1,470 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface PolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.Policy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + java.lang.String getKind(); + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + java.util.List getRulesList(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + com.google.iam.v2.PolicyRule getRules(int index); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + int getRulesCount(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + java.util.List getRulesOrBuilderList(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2.PolicyRule rules = 10; + */ + com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
+   * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The managingAuthority. + */ + java.lang.String getManagingAuthority(); + + /** + * + * + *
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
+   * 
+ * + * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for managingAuthority. + */ + com.google.protobuf.ByteString getManagingAuthorityBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyProto.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyProto.java new file mode 100644 index 000000000000..6f81bd4a567b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyProto.java @@ -0,0 +1,279 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public final class PolicyProto extends com.google.protobuf.GeneratedFile { + private PolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_Policy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_Policy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_Policy_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_PolicyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_PolicyRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_ListPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_ListPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_GetPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_CreatePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_DeletePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "\032google/iam/v2/policy.proto\022\r" + + "google.iam.v2\032\034google/api/annotations.proto\032\027googl" + + "e/api/client.proto\032\037google/api/field_beh" + + "avior.proto\032\030google/iam/v2/deny.proto\032#g" + + "oogle/longrunning/operations.proto\032\037google/protobuf/timestamp.proto\"\302\003\n" + + "\006Policy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\022\020\n" + + "\003uid\030\002 \001(\tB\003\340A\005\022\021\n" + + "\004kind\030\003 \001(\tB\003\340A\003\022\024\n" + + "\014display_name\030\004 \001(\t\022;\n" + + "\013annotations\030\005 \003(\0132&.google.iam.v2.Policy.AnnotationsEntry\022\014\n" + + "\004etag\030\006 \001(\t\0224\n" + + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013delete_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022(\n" + + "\005rules\030\n" + + " \003(\0132\031.google.iam.v2.PolicyRule\022\037\n" + + "\022managing_authority\030\013 \001(\tB\003\340A\005\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"W\n\n" + + "PolicyRule\022,\n" + + "\tdeny_rule\030\002 \001(\0132\027.google.iam.v2.DenyRuleH\000\022\023\n" + + "\013description\030\001 \001(\tB\006\n" + + "\004kind\"Q\n" + + "\023ListPoliciesRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"X\n" + + "\024ListPoliciesResponse\022\'\n" + + "\010policies\030\001 \003(\0132\025.google.iam.v2.Policy\022\027\n" + + "\017next_page_token\030\002 \001(\t\"%\n" + + "\020GetPolicyRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\"i\n" + + "\023CreatePolicyRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022*\n" + + "\006policy\030\002 \001(\0132\025.google.iam.v2.PolicyB\003\340A\002\022\021\n" + + "\tpolicy_id\030\003 \001(\t\"A\n" + + "\023UpdatePolicyRequest\022*\n" + + "\006policy\030\001 \001(\0132\025.google.iam.v2.PolicyB\003\340A\002\";\n" + + "\023DeletePolicyRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\"J\n" + + "\027PolicyOperationMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp2\320\006\n" + + "\010Policies\022\203\001\n" + + "\014ListPolicies\022\".google.iam.v2.ListPoliciesRequest\032#" + + ".google.iam.v2.ListPoliciesResponse\"*\332A\006" + + "parent\202\323\344\223\002\033\022\031/v2/{parent=policies/*/*}\022m\n" + + "\tGetPolicy\022\037.google.iam.v2.GetPolicyRe" + + "quest\032\025.google.iam.v2.Policy\"(\332A\004name\202\323\344\223\002\033\022\031/v2/{name=policies/*/*/*}\022\272\001\n" + + "\014Creat" + + "ePolicy\022\".google.iam.v2.CreatePolicyRequest\032\035.google.longrunning.Operation\"g\312A!\n" + + "\006Policy\022\027PolicyOperationMetadata\332A\027paren" + + "t,policy,policy_id\202\323\344\223\002#\"\031/v2/{parent=policies/*/*}:\006policy\022\247\001\n" + + "\014UpdatePolicy\022\".g" + + "oogle.iam.v2.UpdatePolicyRequest\032\035.google.longrunning.Operation\"T\312A!\n" + + "\006Policy\022\027PolicyOperationMetadata\202\323\344\223\002*\032" + + " /v2/{policy.name=policies/*/*/*}:\006policy\022\237\001\n" + + "\014Delete" + + "Policy\022\".google.iam.v2.DeletePolicyRequest\032\035.google.longrunning.Operation\"L\312A!\n" + + "\006Policy\022\027PolicyOperationMetadata\332A\004name\202\323" + + "\344\223\002\033*\031/v2/{name=policies/*/*/*}\032F\312A\022iam." + + "googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformBy\n" + + "\021com.google.iam.v2B\013PolicyProtoP\001Z)cloud.google.com/go" + + "/iam/apiv2/iampb;iampb\252\002\023Google.Cloud.Ia" + + "m.V2\312\002\023Google\\Cloud\\Iam\\V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.iam.v2.DenyRuleProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v2_Policy_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v2_Policy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_Policy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Kind", + "DisplayName", + "Annotations", + "Etag", + "CreateTime", + "UpdateTime", + "DeleteTime", + "Rules", + "ManagingAuthority", + }); + internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor = + internal_static_google_iam_v2_Policy_descriptor.getNestedType(0); + internal_static_google_iam_v2_Policy_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_iam_v2_PolicyRule_descriptor = getDescriptor().getMessageType(1); + internal_static_google_iam_v2_PolicyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_PolicyRule_descriptor, + new java.lang.String[] { + "DenyRule", "Description", "Kind", + }); + internal_static_google_iam_v2_ListPoliciesRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_ListPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_iam_v2_ListPoliciesResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_ListPoliciesResponse_descriptor, + new java.lang.String[] { + "Policies", "NextPageToken", + }); + internal_static_google_iam_v2_GetPolicyRequest_descriptor = getDescriptor().getMessageType(4); + internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_GetPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v2_CreatePolicyRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_CreatePolicyRequest_descriptor, + new java.lang.String[] { + "Parent", "Policy", "PolicyId", + }); + internal_static_google_iam_v2_UpdatePolicyRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_UpdatePolicyRequest_descriptor, + new java.lang.String[] { + "Policy", + }); + internal_static_google_iam_v2_DeletePolicyRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_DeletePolicyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_iam_v2_PolicyOperationMetadata_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2_PolicyOperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.iam.v2.DenyRuleProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRule.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRule.java new file mode 100644 index 000000000000..60af1dfc0536 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRule.java @@ -0,0 +1,977 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * A single rule in a `Policy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.PolicyRule} + */ +@com.google.protobuf.Generated +public final class PolicyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.PolicyRule) + PolicyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyRule"); + } + + // Use PolicyRule.newBuilder() to construct. + private PolicyRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyRule() { + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.PolicyRule.class, com.google.iam.v2.PolicyRule.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DENY_RULE(2), + KIND_NOT_SET(0); + private final int value; + + private KindCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 2: + return DENY_RULE; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int DENY_RULE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + @java.lang.Override + public boolean hasDenyRule() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + @java.lang.Override + public com.google.iam.v2.DenyRule getDenyRule() { + if (kindCase_ == 2) { + return (com.google.iam.v2.DenyRule) kind_; + } + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + @java.lang.Override + public com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder() { + if (kindCase_ == 2) { + return (com.google.iam.v2.DenyRule) kind_; + } + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.iam.v2.DenyRule) kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.iam.v2.DenyRule) kind_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.PolicyRule)) { + return super.equals(obj); + } + com.google.iam.v2.PolicyRule other = (com.google.iam.v2.PolicyRule) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (!getDenyRule().equals(other.getDenyRule())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (kindCase_) { + case 2: + hash = (37 * hash) + DENY_RULE_FIELD_NUMBER; + hash = (53 * hash) + getDenyRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.PolicyRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.PolicyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.PolicyRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.PolicyRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.PolicyRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.PolicyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.PolicyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A single rule in a `Policy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.PolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.PolicyRule) + com.google.iam.v2.PolicyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_PolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.PolicyRule.class, com.google.iam.v2.PolicyRule.Builder.class); + } + + // Construct using com.google.iam.v2.PolicyRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } + description_ = ""; + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.PolicyRule getDefaultInstanceForType() { + return com.google.iam.v2.PolicyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.PolicyRule build() { + com.google.iam.v2.PolicyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.PolicyRule buildPartial() { + com.google.iam.v2.PolicyRule result = new com.google.iam.v2.PolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.PolicyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + } + + private void buildPartialOneofs(com.google.iam.v2.PolicyRule result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 2 && denyRuleBuilder_ != null) { + result.kind_ = denyRuleBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.PolicyRule) { + return mergeFrom((com.google.iam.v2.PolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.PolicyRule other) { + if (other == com.google.iam.v2.PolicyRule.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getKindCase()) { + case DENY_RULE: + { + mergeDenyRule(other.getDenyRule()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.DenyRule, + com.google.iam.v2.DenyRule.Builder, + com.google.iam.v2.DenyRuleOrBuilder> + denyRuleBuilder_; + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + @java.lang.Override + public boolean hasDenyRule() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + @java.lang.Override + public com.google.iam.v2.DenyRule getDenyRule() { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.iam.v2.DenyRule) kind_; + } + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return denyRuleBuilder_.getMessage(); + } + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + public Builder setDenyRule(com.google.iam.v2.DenyRule value) { + if (denyRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + denyRuleBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + public Builder setDenyRule(com.google.iam.v2.DenyRule.Builder builderForValue) { + if (denyRuleBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + denyRuleBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + public Builder mergeDenyRule(com.google.iam.v2.DenyRule value) { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2 && kind_ != com.google.iam.v2.DenyRule.getDefaultInstance()) { + kind_ = + com.google.iam.v2.DenyRule.newBuilder((com.google.iam.v2.DenyRule) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + denyRuleBuilder_.mergeFrom(value); + } else { + denyRuleBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + public Builder clearDenyRule() { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + denyRuleBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + public com.google.iam.v2.DenyRule.Builder getDenyRuleBuilder() { + return internalGetDenyRuleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + @java.lang.Override + public com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder() { + if ((kindCase_ == 2) && (denyRuleBuilder_ != null)) { + return denyRuleBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.iam.v2.DenyRule) kind_; + } + return com.google.iam.v2.DenyRule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.DenyRule, + com.google.iam.v2.DenyRule.Builder, + com.google.iam.v2.DenyRuleOrBuilder> + internalGetDenyRuleFieldBuilder() { + if (denyRuleBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.iam.v2.DenyRule.getDefaultInstance(); + } + denyRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.DenyRule, + com.google.iam.v2.DenyRule.Builder, + com.google.iam.v2.DenyRuleOrBuilder>( + (com.google.iam.v2.DenyRule) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return denyRuleBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.PolicyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.PolicyRule) + private static final com.google.iam.v2.PolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.PolicyRule(); + } + + public static com.google.iam.v2.PolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.PolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java new file mode 100644 index 000000000000..5929b1438b7b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface PolicyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.PolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + boolean hasDenyRule(); + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + com.google.iam.v2.DenyRule getDenyRule(); + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2.DenyRule deny_rule = 2; + */ + com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder(); + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + com.google.iam.v2.PolicyRule.KindCase getKindCase(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java new file mode 100644 index 000000000000..5789cebf9530 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java @@ -0,0 +1,733 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +/** + * + * + *
+ * Request message for `UpdatePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2.UpdatePolicyRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2.UpdatePolicyRequest) + UpdatePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePolicyRequest"); + } + + // Use UpdatePolicyRequest.newBuilder() to construct. + private UpdatePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePolicyRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.UpdatePolicyRequest.class, + com.google.iam.v2.UpdatePolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int POLICY_FIELD_NUMBER = 1; + private com.google.iam.v2.Policy policy_; + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v2.Policy getPolicy() { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2.UpdatePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2.UpdatePolicyRequest other = (com.google.iam.v2.UpdatePolicyRequest) obj; + + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2.UpdatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2.UpdatePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `UpdatePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2.UpdatePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2.UpdatePolicyRequest) + com.google.iam.v2.UpdatePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2.UpdatePolicyRequest.class, + com.google.iam.v2.UpdatePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2.UpdatePolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2.PolicyProto + .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2.UpdatePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2.UpdatePolicyRequest build() { + com.google.iam.v2.UpdatePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2.UpdatePolicyRequest buildPartial() { + com.google.iam.v2.UpdatePolicyRequest result = + new com.google.iam.v2.UpdatePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2.UpdatePolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2.UpdatePolicyRequest) { + return mergeFrom((com.google.iam.v2.UpdatePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2.UpdatePolicyRequest other) { + if (other == com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance()) return this; + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v2.Policy policy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + policyBuilder_; + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + public com.google.iam.v2.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + } else { + policyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePolicy(com.google.iam.v2.Policy value) { + if (policyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policy_ != null + && policy_ != com.google.iam.v2.Policy.getDefaultInstance()) { + getPolicyBuilder().mergeFrom(value); + } else { + policy_ = value; + } + } else { + policyBuilder_.mergeFrom(value); + } + if (policy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2.Policy.Builder getPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder> + internalGetPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2.Policy, + com.google.iam.v2.Policy.Builder, + com.google.iam.v2.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2.UpdatePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2.UpdatePolicyRequest) + private static final com.google.iam.v2.UpdatePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2.UpdatePolicyRequest(); + } + + public static com.google.iam.v2.UpdatePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2.UpdatePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..b40b80f78eab --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2; + +@com.google.protobuf.Generated +public interface UpdatePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2.UpdatePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + com.google.iam.v2.Policy getPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/deny.proto b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/deny.proto new file mode 100644 index 000000000000..9d4dc4b5e23c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/deny.proto @@ -0,0 +1,109 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v2; + +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V2"; +option go_package = "cloud.google.com/go/iam/apiv2/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "DenyRuleProto"; +option java_package = "com.google.iam.v2"; +option php_namespace = "Google\\Cloud\\Iam\\V2"; + +// A deny rule in an IAM deny policy. +message DenyRule { + // The identities that are prevented from using one or more permissions on + // Google Cloud resources. This field can contain the following values: + // + // * `principalSet://goog/public:all`: A special identifier that represents + // any principal that is on the internet, even if they do not have a Google + // Account or are not logged in. + // + // * `principal://goog/subject/{email_id}`: A specific Google Account. + // Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + // example, `principal://goog/subject/alice@example.com`. + // + // * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + // Google Account that was deleted recently. For example, + // `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + // the Google Account is recovered, this identifier reverts to the standard + // identifier for a Google Account. + // + // * `principalSet://goog/group/{group_id}`: A Google group. For example, + // `principalSet://goog/group/admins@example.com`. + // + // * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + // that was deleted recently. For example, + // `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + // the Google group is restored, this identifier reverts to the standard + // identifier for a Google group. + // + // * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + // A Google Cloud service account. For example, + // `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + // + // * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + // A Google Cloud service account that was deleted recently. For example, + // `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + // If the service account is undeleted, this identifier reverts to the + // standard identifier for a service account. + // + // * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + // principals associated with the specified Google Workspace or Cloud + // Identity customer ID. For example, + // `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + repeated string denied_principals = 1; + + // The identities that are excluded from the deny rule, even if they are + // listed in the `denied_principals`. For example, you could add a Google + // group to the `denied_principals`, then exclude specific users who belong to + // that group. + // + // This field can contain the same values as the `denied_principals` field, + // excluding `principalSet://goog/public:all`, which represents all users on + // the internet. + repeated string exception_principals = 2; + + // The permissions that are explicitly denied by this rule. Each permission + // uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + // is the fully qualified domain name for the service. For example, + // `iam.googleapis.com/roles.list`. + repeated string denied_permissions = 3; + + // Specifies the permissions that this rule excludes from the set of denied + // permissions given by `denied_permissions`. If a permission appears in + // `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + // denied. + // + // The excluded permissions can be specified using the same syntax as + // `denied_permissions`. + repeated string exception_permissions = 4; + + // The condition that determines whether this deny rule applies to a request. + // If the condition expression evaluates to `true`, then the deny rule is + // applied; otherwise, the deny rule is not applied. + // + // Each deny rule is evaluated independently. If this deny rule does not apply + // to a request, other deny rules might still apply. + // + // The condition can use CEL functions that evaluate + // [resource + // tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + // functions and operators are not supported. + google.type.Expr denial_condition = 5; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/policy.proto b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/policy.proto new file mode 100644 index 000000000000..7b34d8259bc0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2/src/main/proto/google/iam/v2/policy.proto @@ -0,0 +1,287 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/iam/v2/deny.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V2"; +option go_package = "cloud.google.com/go/iam/apiv2/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.iam.v2"; +option php_namespace = "Google\\Cloud\\Iam\\V2"; + +// An interface for managing Identity and Access Management (IAM) policies. +service Policies { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Retrieves the policies of the specified kind that are attached to a + // resource. + // + // The response lists only policy metadata. In particular, policy rules are + // omitted. + rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) { + option (google.api.http) = { + get: "/v2/{parent=policies/*/*}" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a policy. + rpc GetPolicy(GetPolicyRequest) returns (Policy) { + option (google.api.http) = { + get: "/v2/{name=policies/*/*/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a policy. + rpc CreatePolicy(CreatePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=policies/*/*}" + body: "policy" + }; + option (google.api.method_signature) = "parent,policy,policy_id"; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } + + // Updates the specified policy. + // + // You can update only the rules and the display name for the policy. + // + // To update a policy, you should use a read-modify-write loop: + // + // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. + // 2. Modify the policy as needed. + // 3. Use `UpdatePolicy` to write the updated policy. + // + // This pattern helps prevent conflicts between concurrent updates. + rpc UpdatePolicy(UpdatePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + put: "/v2/{policy.name=policies/*/*/*}" + body: "policy" + }; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } + + // Deletes a policy. This action is permanent. + rpc DeletePolicy(DeletePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2/{name=policies/*/*/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } +} + +// Data for an IAM policy. +message Policy { + // Immutable. The resource name of the `Policy`, which must be unique. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, requests can use the alphanumeric or the numeric ID. + // Responses always contain the numeric ID. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + // `Policy` is created. + string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-specified description of the `Policy`. This value can be up to 63 + // characters. + string display_name = 4; + + // A key-value map to store arbitrary metadata for the `Policy`. Keys + // can be up to 63 characters. Values can be up to 255 characters. + map annotations = 5; + + // An opaque tag that identifies the current version of the `Policy`. IAM uses + // this value to help manage concurrent updates, so they do not cause one + // update to be overwritten by another. + // + // If this field is present in a [CreatePolicy][] request, the value is + // ignored. + string etag = 6; + + // Output only. The time when the `Policy` was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the `Policy` was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A list of rules that specify the behavior of the `Policy`. All of the rules + // should be of the `kind` specified in the `Policy`. + repeated PolicyRule rules = 10; + + // Immutable. Specifies that this policy is managed by an authority and can only be + // modified by that authority. Usage is restricted. + string managing_authority = 11 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A single rule in a `Policy`. +message PolicyRule { + oneof kind { + // A rule for a deny policy. + DenyRule deny_rule = 2; + } + + // A user-specified description of the rule. This value can be up to 256 + // characters. + string description = 1; +} + +// Request message for `ListPolicies`. +message ListPoliciesRequest { + // Required. The resource that the policy is attached to, along with the kind of policy + // to list. Format: + // `policies/{attachment_point}/denypolicies` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of policies to return. IAM ignores this value and uses + // the value 1000. + int32 page_size = 2; + + // A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + // retrieve the next page. + string page_token = 3; +} + +// Response message for `ListPolicies`. +message ListPoliciesResponse { + // Metadata for the policies that are attached to the resource. + repeated Policy policies = 1; + + // A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + // next page. If this field is omitted, there are no additional pages. + string next_page_token = 2; +} + +// Request message for `GetPolicy`. +message GetPolicyRequest { + // Required. The resource name of the policy to retrieve. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // Use the URL-encoded full resource name, which means that the forward-slash + // character, `/`, must be written as `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `CreatePolicy`. +message CreatePolicyRequest { + // Required. The resource that the policy is attached to, along with the kind of policy + // to create. Format: `policies/{attachment_point}/denypolicies` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The policy to create. + Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; + + // The ID to use for this policy, which will become the final component of + // the policy's resource name. The ID must contain 3 to 63 characters. It can + // contain lowercase letters and numbers, as well as dashes (`-`) and periods + // (`.`). The first character must be a lowercase letter. + string policy_id = 3; +} + +// Request message for `UpdatePolicy`. +message UpdatePolicyRequest { + // Required. The policy to update. + // + // To prevent conflicting updates, the `etag` value must match the value that + // is stored in IAM. If the `etag` values do not match, the request fails with + // a `409` error code and `ABORTED` status. + Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `DeletePolicy`. +message DeletePolicyRequest { + // Required. The resource name of the policy to delete. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // Use the URL-encoded full resource name, which means that the forward-slash + // character, `/`, must be written as `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The expected `etag` of the policy to delete. If the value does not match + // the value that is stored in IAM, the request fails with a `409` error code + // and `ABORTED` status. + // + // If you omit this field, the policy is deleted regardless of its current + // `etag`. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata for long-running `Policy` operations. +message PolicyOperationMetadata { + // Timestamp when the `google.longrunning.Operation` was created. + google.protobuf.Timestamp create_time = 1; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/pom.xml b/java-common-iam/proto-proto-google-iam-v1-v2beta/pom.xml new file mode 100644 index 000000000000..907243f54092 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v2beta + 1.65.0 + proto-proto-google-iam-v1-v2beta + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java new file mode 100644 index 000000000000..c38d3686c528 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java @@ -0,0 +1,1158 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Request message for `CreatePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.CreatePolicyRequest} + */ +@com.google.protobuf.Generated +public final class CreatePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.CreatePolicyRequest) + CreatePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePolicyRequest"); + } + + // Use CreatePolicyRequest.newBuilder() to construct. + private CreatePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePolicyRequest() { + parent_ = ""; + policyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.CreatePolicyRequest.class, + com.google.iam.v2beta.CreatePolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 2; + private com.google.iam.v2beta.Policy policy_; + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v2beta.Policy getPolicy() { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + + public static final int POLICY_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyId_ = ""; + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + @java.lang.Override + public java.lang.String getPolicyId() { + java.lang.Object ref = policyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyId_ = s; + return s; + } + } + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyIdBytes() { + java.lang.Object ref = policyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPolicy()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, policyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, policyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.CreatePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2beta.CreatePolicyRequest other = + (com.google.iam.v2beta.CreatePolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (!getPolicyId().equals(other.getPolicyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.CreatePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `CreatePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.CreatePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.CreatePolicyRequest) + com.google.iam.v2beta.CreatePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.CreatePolicyRequest.class, + com.google.iam.v2beta.CreatePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2beta.CreatePolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + policyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.CreatePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.CreatePolicyRequest build() { + com.google.iam.v2beta.CreatePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.CreatePolicyRequest buildPartial() { + com.google.iam.v2beta.CreatePolicyRequest result = + new com.google.iam.v2beta.CreatePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.CreatePolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyId_ = policyId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.CreatePolicyRequest) { + return mergeFrom((com.google.iam.v2beta.CreatePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.CreatePolicyRequest other) { + if (other == com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (!other.getPolicyId().isEmpty()) { + policyId_ = other.policyId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + policyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.iam.v2beta.Policy policy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + policyBuilder_; + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + public com.google.iam.v2beta.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2beta.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + } else { + policyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2beta.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePolicy(com.google.iam.v2beta.Policy value) { + if (policyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && policy_ != null + && policy_ != com.google.iam.v2beta.Policy.getDefaultInstance()) { + getPolicyBuilder().mergeFrom(value); + } else { + policy_ = value; + } + } else { + policyBuilder_.mergeFrom(value); + } + if (policy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2beta.Policy.Builder getPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + } + + /** + * + * + *
+     * Required. The policy to create.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + internalGetPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder>( + getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private java.lang.Object policyId_ = ""; + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + public java.lang.String getPolicyId() { + java.lang.Object ref = policyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + public com.google.protobuf.ByteString getPolicyIdBytes() { + java.lang.Object ref = policyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @param value The policyId to set. + * @return This builder for chaining. + */ + public Builder setPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearPolicyId() { + policyId_ = getDefaultInstance().getPolicyId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID to use for this policy, which will become the final component of
+     * the policy's resource name. The ID must contain 3 to 63 characters. It can
+     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+     * (`.`). The first character must be a lowercase letter.
+     * 
+ * + * string policy_id = 3; + * + * @param value The bytes for policyId to set. + * @return This builder for chaining. + */ + public Builder setPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.CreatePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.CreatePolicyRequest) + private static final com.google.iam.v2beta.CreatePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.CreatePolicyRequest(); + } + + public static com.google.iam.v2beta.CreatePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.CreatePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..b639e27bd43b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface CreatePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.CreatePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + com.google.iam.v2beta.Policy getPolicy(); + + /** + * + * + *
+   * Required. The policy to create.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder(); + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The policyId. + */ + java.lang.String getPolicyId(); + + /** + * + * + *
+   * The ID to use for this policy, which will become the final component of
+   * the policy's resource name. The ID must contain 3 to 63 characters. It can
+   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
+   * (`.`). The first character must be a lowercase letter.
+   * 
+ * + * string policy_id = 3; + * + * @return The bytes for policyId. + */ + com.google.protobuf.ByteString getPolicyIdBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java new file mode 100644 index 000000000000..fa5b45baf984 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java @@ -0,0 +1,882 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Request message for `DeletePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.DeletePolicyRequest} + */ +@com.google.protobuf.Generated +public final class DeletePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.DeletePolicyRequest) + DeletePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePolicyRequest"); + } + + // Use DeletePolicyRequest.newBuilder() to construct. + private DeletePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePolicyRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.DeletePolicyRequest.class, + com.google.iam.v2beta.DeletePolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.DeletePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2beta.DeletePolicyRequest other = + (com.google.iam.v2beta.DeletePolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.DeletePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `DeletePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.DeletePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.DeletePolicyRequest) + com.google.iam.v2beta.DeletePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.DeletePolicyRequest.class, + com.google.iam.v2beta.DeletePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2beta.DeletePolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.DeletePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.DeletePolicyRequest build() { + com.google.iam.v2beta.DeletePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.DeletePolicyRequest buildPartial() { + com.google.iam.v2beta.DeletePolicyRequest result = + new com.google.iam.v2beta.DeletePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.DeletePolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.DeletePolicyRequest) { + return mergeFrom((com.google.iam.v2beta.DeletePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.DeletePolicyRequest other) { + if (other == com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to delete. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
+     *
+     * If you omit this field, the policy is deleted regardless of its current
+     * `etag`.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.DeletePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.DeletePolicyRequest) + private static final com.google.iam.v2beta.DeletePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.DeletePolicyRequest(); + } + + public static com.google.iam.v2beta.DeletePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.DeletePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..f472edaaf77b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface DeletePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.DeletePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the policy to delete. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
+   *
+   * If you omit this field, the policy is deleted regardless of its current
+   * `etag`.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java new file mode 100644 index 000000000000..96f53586c2d4 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java @@ -0,0 +1,2679 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * A deny rule in an IAM deny policy.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.DenyRule} + */ +@com.google.protobuf.Generated +public final class DenyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.DenyRule) + DenyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DenyRule"); + } + + // Use DenyRule.newBuilder() to construct. + private DenyRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DenyRule() { + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.DenyRuleProto + .internal_static_google_iam_v2beta_DenyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.DenyRuleProto + .internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.DenyRule.class, com.google.iam.v2beta.DenyRule.Builder.class); + } + + private int bitField0_; + public static final int DENIED_PRINCIPALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList deniedPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { + return deniedPrincipals_; + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + public int getDeniedPrincipalsCount() { + return deniedPrincipals_.size(); + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + public java.lang.String getDeniedPrincipals(int index) { + return deniedPrincipals_.get(index); + } + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { + return deniedPrincipals_.getByteString(index); + } + + public static final int EXCEPTION_PRINCIPALS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList exceptionPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { + return exceptionPrincipals_; + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + public int getExceptionPrincipalsCount() { + return exceptionPrincipals_.size(); + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + public java.lang.String getExceptionPrincipals(int index) { + return exceptionPrincipals_.get(index); + } + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { + return exceptionPrincipals_.getByteString(index); + } + + public static final int DENIED_PERMISSIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList deniedPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { + return deniedPermissions_; + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + public int getDeniedPermissionsCount() { + return deniedPermissions_.size(); + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + public java.lang.String getDeniedPermissions(int index) { + return deniedPermissions_.get(index); + } + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { + return deniedPermissions_.getByteString(index); + } + + public static final int EXCEPTION_PERMISSIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList exceptionPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { + return exceptionPermissions_; + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + public int getExceptionPermissionsCount() { + return exceptionPermissions_.size(); + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + public java.lang.String getExceptionPermissions(int index) { + return exceptionPermissions_.get(index); + } + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { + return exceptionPermissions_.getByteString(index); + } + + public static final int DENIAL_CONDITION_FIELD_NUMBER = 5; + private com.google.type.Expr denialCondition_; + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + @java.lang.Override + public boolean hasDenialCondition() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + @java.lang.Override + public com.google.type.Expr getDenialCondition() { + return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; + } + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { + return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deniedPrincipals_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, deniedPrincipals_.getRaw(i)); + } + for (int i = 0; i < exceptionPrincipals_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, exceptionPrincipals_.getRaw(i)); + } + for (int i = 0; i < deniedPermissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, deniedPermissions_.getRaw(i)); + } + for (int i = 0; i < exceptionPermissions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, exceptionPermissions_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getDenialCondition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < deniedPrincipals_.size(); i++) { + dataSize += computeStringSizeNoTag(deniedPrincipals_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeniedPrincipalsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exceptionPrincipals_.size(); i++) { + dataSize += computeStringSizeNoTag(exceptionPrincipals_.getRaw(i)); + } + size += dataSize; + size += 1 * getExceptionPrincipalsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < deniedPermissions_.size(); i++) { + dataSize += computeStringSizeNoTag(deniedPermissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeniedPermissionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exceptionPermissions_.size(); i++) { + dataSize += computeStringSizeNoTag(exceptionPermissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getExceptionPermissionsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.DenyRule)) { + return super.equals(obj); + } + com.google.iam.v2beta.DenyRule other = (com.google.iam.v2beta.DenyRule) obj; + + if (!getDeniedPrincipalsList().equals(other.getDeniedPrincipalsList())) return false; + if (!getExceptionPrincipalsList().equals(other.getExceptionPrincipalsList())) return false; + if (!getDeniedPermissionsList().equals(other.getDeniedPermissionsList())) return false; + if (!getExceptionPermissionsList().equals(other.getExceptionPermissionsList())) return false; + if (hasDenialCondition() != other.hasDenialCondition()) return false; + if (hasDenialCondition()) { + if (!getDenialCondition().equals(other.getDenialCondition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeniedPrincipalsCount() > 0) { + hash = (37 * hash) + DENIED_PRINCIPALS_FIELD_NUMBER; + hash = (53 * hash) + getDeniedPrincipalsList().hashCode(); + } + if (getExceptionPrincipalsCount() > 0) { + hash = (37 * hash) + EXCEPTION_PRINCIPALS_FIELD_NUMBER; + hash = (53 * hash) + getExceptionPrincipalsList().hashCode(); + } + if (getDeniedPermissionsCount() > 0) { + hash = (37 * hash) + DENIED_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDeniedPermissionsList().hashCode(); + } + if (getExceptionPermissionsCount() > 0) { + hash = (37 * hash) + EXCEPTION_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExceptionPermissionsList().hashCode(); + } + if (hasDenialCondition()) { + hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getDenialCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.DenyRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DenyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DenyRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DenyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DenyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.DenyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.DenyRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DenyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.DenyRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DenyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.DenyRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.DenyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.DenyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A deny rule in an IAM deny policy.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.DenyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.DenyRule) + com.google.iam.v2beta.DenyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.DenyRuleProto + .internal_static_google_iam_v2beta_DenyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.DenyRuleProto + .internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.DenyRule.class, com.google.iam.v2beta.DenyRule.Builder.class); + } + + // Construct using com.google.iam.v2beta.DenyRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDenialConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + denialCondition_ = null; + if (denialConditionBuilder_ != null) { + denialConditionBuilder_.dispose(); + denialConditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.DenyRuleProto + .internal_static_google_iam_v2beta_DenyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.DenyRule getDefaultInstanceForType() { + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.DenyRule build() { + com.google.iam.v2beta.DenyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.DenyRule buildPartial() { + com.google.iam.v2beta.DenyRule result = new com.google.iam.v2beta.DenyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.DenyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + deniedPrincipals_.makeImmutable(); + result.deniedPrincipals_ = deniedPrincipals_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + exceptionPrincipals_.makeImmutable(); + result.exceptionPrincipals_ = exceptionPrincipals_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + deniedPermissions_.makeImmutable(); + result.deniedPermissions_ = deniedPermissions_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + exceptionPermissions_.makeImmutable(); + result.exceptionPermissions_ = exceptionPermissions_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.denialCondition_ = + denialConditionBuilder_ == null ? denialCondition_ : denialConditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.DenyRule) { + return mergeFrom((com.google.iam.v2beta.DenyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.DenyRule other) { + if (other == com.google.iam.v2beta.DenyRule.getDefaultInstance()) return this; + if (!other.deniedPrincipals_.isEmpty()) { + if (deniedPrincipals_.isEmpty()) { + deniedPrincipals_ = other.deniedPrincipals_; + bitField0_ |= 0x00000001; + } else { + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.addAll(other.deniedPrincipals_); + } + onChanged(); + } + if (!other.exceptionPrincipals_.isEmpty()) { + if (exceptionPrincipals_.isEmpty()) { + exceptionPrincipals_ = other.exceptionPrincipals_; + bitField0_ |= 0x00000002; + } else { + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.addAll(other.exceptionPrincipals_); + } + onChanged(); + } + if (!other.deniedPermissions_.isEmpty()) { + if (deniedPermissions_.isEmpty()) { + deniedPermissions_ = other.deniedPermissions_; + bitField0_ |= 0x00000004; + } else { + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.addAll(other.deniedPermissions_); + } + onChanged(); + } + if (!other.exceptionPermissions_.isEmpty()) { + if (exceptionPermissions_.isEmpty()) { + exceptionPermissions_ = other.exceptionPermissions_; + bitField0_ |= 0x00000008; + } else { + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.addAll(other.exceptionPermissions_); + } + onChanged(); + } + if (other.hasDenialCondition()) { + mergeDenialCondition(other.getDenialCondition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDenialConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList deniedPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDeniedPrincipalsIsMutable() { + if (!deniedPrincipals_.isModifiable()) { + deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(deniedPrincipals_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { + deniedPrincipals_.makeImmutable(); + return deniedPrincipals_; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + public int getDeniedPrincipalsCount() { + return deniedPrincipals_.size(); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + public java.lang.String getDeniedPrincipals(int index) { + return deniedPrincipals_.get(index); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { + return deniedPrincipals_.getByteString(index); + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index to set the value at. + * @param value The deniedPrincipals to set. + * @return This builder for chaining. + */ + public Builder setDeniedPrincipals(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param value The deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addDeniedPrincipals(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param values The deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addAllDeniedPrincipals(java.lang.Iterable values) { + ensureDeniedPrincipalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPrincipals_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @return This builder for chaining. + */ + public Builder clearDeniedPrincipals() { + deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are prevented from using one or more permissions on
+     * Google Cloud resources. This field can contain the following values:
+     *
+     * * `principalSet://goog/public:all`: A special identifier that represents
+     * any principal that is on the internet, even if they do not have a Google
+     * Account or are not logged in.
+     *
+     * * `principal://goog/subject/{email_id}`: A specific Google Account.
+     * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+     * example, `principal://goog/subject/alice@example.com`.
+     *
+     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+     * Google Account that was deleted recently. For example,
+     * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+     * the Google Account is recovered, this identifier reverts to the standard
+     * identifier for a Google Account.
+     *
+     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+     * `principalSet://goog/group/admins@example.com`.
+     *
+     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+     * that was deleted recently. For example,
+     * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+     * the Google group is restored, this identifier reverts to the standard
+     * identifier for a Google group.
+     *
+     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+     * A Google Cloud service account. For example,
+     * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+     *
+     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+     * A Google Cloud service account that was deleted recently. For example,
+     * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+     * If the service account is undeleted, this identifier reverts to the
+     * standard identifier for a service account.
+     *
+     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+     * principals associated with the specified Google Workspace or Cloud
+     * Identity customer ID. For example,
+     * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+     * 
+ * + * repeated string denied_principals = 1; + * + * @param value The bytes of the deniedPrincipals to add. + * @return This builder for chaining. + */ + public Builder addDeniedPrincipalsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList exceptionPrincipals_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExceptionPrincipalsIsMutable() { + if (!exceptionPrincipals_.isModifiable()) { + exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(exceptionPrincipals_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { + exceptionPrincipals_.makeImmutable(); + return exceptionPrincipals_; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + public int getExceptionPrincipalsCount() { + return exceptionPrincipals_.size(); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + public java.lang.String getExceptionPrincipals(int index) { + return exceptionPrincipals_.get(index); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { + return exceptionPrincipals_.getByteString(index); + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index to set the value at. + * @param value The exceptionPrincipals to set. + * @return This builder for chaining. + */ + public Builder setExceptionPrincipals(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param value The exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addExceptionPrincipals(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param values The exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addAllExceptionPrincipals(java.lang.Iterable values) { + ensureExceptionPrincipalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPrincipals_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @return This builder for chaining. + */ + public Builder clearExceptionPrincipals() { + exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identities that are excluded from the deny rule, even if they are
+     * listed in the `denied_principals`. For example, you could add a Google
+     * group to the `denied_principals`, then exclude specific users who belong to
+     * that group.
+     *
+     * This field can contain the same values as the `denied_principals` field,
+     * excluding `principalSet://goog/public:all`, which represents all users on
+     * the internet.
+     * 
+ * + * repeated string exception_principals = 2; + * + * @param value The bytes of the exceptionPrincipals to add. + * @return This builder for chaining. + */ + public Builder addExceptionPrincipalsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList deniedPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDeniedPermissionsIsMutable() { + if (!deniedPermissions_.isModifiable()) { + deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(deniedPermissions_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { + deniedPermissions_.makeImmutable(); + return deniedPermissions_; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + public int getDeniedPermissionsCount() { + return deniedPermissions_.size(); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + public java.lang.String getDeniedPermissions(int index) { + return deniedPermissions_.get(index); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { + return deniedPermissions_.getByteString(index); + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index to set the value at. + * @param value The deniedPermissions to set. + * @return This builder for chaining. + */ + public Builder setDeniedPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param value The deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addDeniedPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param values The deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addAllDeniedPermissions(java.lang.Iterable values) { + ensureDeniedPermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPermissions_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeniedPermissions() { + deniedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The permissions that are explicitly denied by this rule. Each permission
+     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+     * is the fully qualified domain name for the service. For example,
+     * `iam.googleapis.com/roles.list`.
+     * 
+ * + * repeated string denied_permissions = 3; + * + * @param value The bytes of the deniedPermissions to add. + * @return This builder for chaining. + */ + public Builder addDeniedPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList exceptionPermissions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExceptionPermissionsIsMutable() { + if (!exceptionPermissions_.isModifiable()) { + exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(exceptionPermissions_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { + exceptionPermissions_.makeImmutable(); + return exceptionPermissions_; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + public int getExceptionPermissionsCount() { + return exceptionPermissions_.size(); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + public java.lang.String getExceptionPermissions(int index) { + return exceptionPermissions_.get(index); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { + return exceptionPermissions_.getByteString(index); + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index to set the value at. + * @param value The exceptionPermissions to set. + * @return This builder for chaining. + */ + public Builder setExceptionPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param value The exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addExceptionPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param values The exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addAllExceptionPermissions(java.lang.Iterable values) { + ensureExceptionPermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPermissions_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @return This builder for chaining. + */ + public Builder clearExceptionPermissions() { + exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the permissions that this rule excludes from the set of denied
+     * permissions given by `denied_permissions`. If a permission appears in
+     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+     * denied.
+     *
+     * The excluded permissions can be specified using the same syntax as
+     * `denied_permissions`.
+     * 
+ * + * repeated string exception_permissions = 4; + * + * @param value The bytes of the exceptionPermissions to add. + * @return This builder for chaining. + */ + public Builder addExceptionPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.type.Expr denialCondition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + denialConditionBuilder_; + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + public boolean hasDenialCondition() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + public com.google.type.Expr getDenialCondition() { + if (denialConditionBuilder_ == null) { + return denialCondition_ == null + ? com.google.type.Expr.getDefaultInstance() + : denialCondition_; + } else { + return denialConditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder setDenialCondition(com.google.type.Expr value) { + if (denialConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + denialCondition_ = value; + } else { + denialConditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder setDenialCondition(com.google.type.Expr.Builder builderForValue) { + if (denialConditionBuilder_ == null) { + denialCondition_ = builderForValue.build(); + } else { + denialConditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder mergeDenialCondition(com.google.type.Expr value) { + if (denialConditionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && denialCondition_ != null + && denialCondition_ != com.google.type.Expr.getDefaultInstance()) { + getDenialConditionBuilder().mergeFrom(value); + } else { + denialCondition_ = value; + } + } else { + denialConditionBuilder_.mergeFrom(value); + } + if (denialCondition_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public Builder clearDenialCondition() { + bitField0_ = (bitField0_ & ~0x00000010); + denialCondition_ = null; + if (denialConditionBuilder_ != null) { + denialConditionBuilder_.dispose(); + denialConditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public com.google.type.Expr.Builder getDenialConditionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetDenialConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { + if (denialConditionBuilder_ != null) { + return denialConditionBuilder_.getMessageOrBuilder(); + } else { + return denialCondition_ == null + ? com.google.type.Expr.getDefaultInstance() + : denialCondition_; + } + } + + /** + * + * + *
+     * The condition that determines whether this deny rule applies to a request.
+     * If the condition expression evaluates to `true`, then the deny rule is
+     * applied; otherwise, the deny rule is not applied.
+     *
+     * Each deny rule is evaluated independently. If this deny rule does not apply
+     * to a request, other deny rules might still apply.
+     *
+     * The condition can use CEL functions that evaluate
+     * [resource
+     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+     * functions and operators are not supported.
+     * 
+ * + * .google.type.Expr denial_condition = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetDenialConditionFieldBuilder() { + if (denialConditionBuilder_ == null) { + denialConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getDenialCondition(), getParentForChildren(), isClean()); + denialCondition_ = null; + } + return denialConditionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.DenyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.DenyRule) + private static final com.google.iam.v2beta.DenyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.DenyRule(); + } + + public static com.google.iam.v2beta.DenyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DenyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.DenyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java new file mode 100644 index 000000000000..2b366f2b21f0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java @@ -0,0 +1,531 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface DenyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.DenyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return A list containing the deniedPrincipals. + */ + java.util.List getDeniedPrincipalsList(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @return The count of deniedPrincipals. + */ + int getDeniedPrincipalsCount(); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the element to return. + * @return The deniedPrincipals at the given index. + */ + java.lang.String getDeniedPrincipals(int index); + + /** + * + * + *
+   * The identities that are prevented from using one or more permissions on
+   * Google Cloud resources. This field can contain the following values:
+   *
+   * * `principalSet://goog/public:all`: A special identifier that represents
+   * any principal that is on the internet, even if they do not have a Google
+   * Account or are not logged in.
+   *
+   * * `principal://goog/subject/{email_id}`: A specific Google Account.
+   * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
+   * example, `principal://goog/subject/alice@example.com`.
+   *
+   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
+   * Google Account that was deleted recently. For example,
+   * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
+   * the Google Account is recovered, this identifier reverts to the standard
+   * identifier for a Google Account.
+   *
+   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
+   * `principalSet://goog/group/admins@example.com`.
+   *
+   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
+   * that was deleted recently. For example,
+   * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
+   * the Google group is restored, this identifier reverts to the standard
+   * identifier for a Google group.
+   *
+   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
+   * A Google Cloud service account. For example,
+   * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
+   *
+   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
+   * A Google Cloud service account that was deleted recently. For example,
+   * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
+   * If the service account is undeleted, this identifier reverts to the
+   * standard identifier for a service account.
+   *
+   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
+   * principals associated with the specified Google Workspace or Cloud
+   * Identity customer ID. For example,
+   * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
+   * 
+ * + * repeated string denied_principals = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPrincipals at the given index. + */ + com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return A list containing the exceptionPrincipals. + */ + java.util.List getExceptionPrincipalsList(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @return The count of exceptionPrincipals. + */ + int getExceptionPrincipalsCount(); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the element to return. + * @return The exceptionPrincipals at the given index. + */ + java.lang.String getExceptionPrincipals(int index); + + /** + * + * + *
+   * The identities that are excluded from the deny rule, even if they are
+   * listed in the `denied_principals`. For example, you could add a Google
+   * group to the `denied_principals`, then exclude specific users who belong to
+   * that group.
+   *
+   * This field can contain the same values as the `denied_principals` field,
+   * excluding `principalSet://goog/public:all`, which represents all users on
+   * the internet.
+   * 
+ * + * repeated string exception_principals = 2; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPrincipals at the given index. + */ + com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return A list containing the deniedPermissions. + */ + java.util.List getDeniedPermissionsList(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @return The count of deniedPermissions. + */ + int getDeniedPermissionsCount(); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the element to return. + * @return The deniedPermissions at the given index. + */ + java.lang.String getDeniedPermissions(int index); + + /** + * + * + *
+   * The permissions that are explicitly denied by this rule. Each permission
+   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
+   * is the fully qualified domain name for the service. For example,
+   * `iam.googleapis.com/roles.list`.
+   * 
+ * + * repeated string denied_permissions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the deniedPermissions at the given index. + */ + com.google.protobuf.ByteString getDeniedPermissionsBytes(int index); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return A list containing the exceptionPermissions. + */ + java.util.List getExceptionPermissionsList(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @return The count of exceptionPermissions. + */ + int getExceptionPermissionsCount(); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the element to return. + * @return The exceptionPermissions at the given index. + */ + java.lang.String getExceptionPermissions(int index); + + /** + * + * + *
+   * Specifies the permissions that this rule excludes from the set of denied
+   * permissions given by `denied_permissions`. If a permission appears in
+   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
+   * denied.
+   *
+   * The excluded permissions can be specified using the same syntax as
+   * `denied_permissions`.
+   * 
+ * + * repeated string exception_permissions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exceptionPermissions at the given index. + */ + com.google.protobuf.ByteString getExceptionPermissionsBytes(int index); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return Whether the denialCondition field is set. + */ + boolean hasDenialCondition(); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + * + * @return The denialCondition. + */ + com.google.type.Expr getDenialCondition(); + + /** + * + * + *
+   * The condition that determines whether this deny rule applies to a request.
+   * If the condition expression evaluates to `true`, then the deny rule is
+   * applied; otherwise, the deny rule is not applied.
+   *
+   * Each deny rule is evaluated independently. If this deny rule does not apply
+   * to a request, other deny rules might still apply.
+   *
+   * The condition can use CEL functions that evaluate
+   * [resource
+   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
+   * functions and operators are not supported.
+   * 
+ * + * .google.type.Expr denial_condition = 5; + */ + com.google.type.ExprOrBuilder getDenialConditionOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java new file mode 100644 index 000000000000..28ff314dbf42 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/deny.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public final class DenyRuleProto extends com.google.protobuf.GeneratedFile { + private DenyRuleProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DenyRuleProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_DenyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\034google/iam/v2beta/deny.proto\022\021google.i" + + "am.v2beta\032\026google/type/expr.proto\"\253\001\n\010De" + + "nyRule\022\031\n\021denied_principals\030\001 \003(\t\022\034\n\024exc" + + "eption_principals\030\002 \003(\t\022\032\n\022denied_permis" + + "sions\030\003 \003(\t\022\035\n\025exception_permissions\030\004 \003" + + "(\t\022+\n\020denial_condition\030\005 \001(\0132\021.google.ty" + + "pe.ExprB\213\001\n\025com.google.iam.v2betaB\rDenyR" + + "uleProtoP\001Z-cloud.google.com/go/iam/apiv" + + "2beta/iampb;iampb\252\002\027Google.Cloud.Iam.V2B" + + "eta\312\002\027Google\\Cloud\\Iam\\V2betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v2beta_DenyRule_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_DenyRule_descriptor, + new java.lang.String[] { + "DeniedPrincipals", + "ExceptionPrincipals", + "DeniedPermissions", + "ExceptionPermissions", + "DenialCondition", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.type.ExprProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java new file mode 100644 index 000000000000..bf6df7a08986 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java @@ -0,0 +1,657 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Request message for `GetPolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.GetPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.GetPolicyRequest) + GetPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyRequest"); + } + + // Use GetPolicyRequest.newBuilder() to construct. + private GetPolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.GetPolicyRequest.class, + com.google.iam.v2beta.GetPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.GetPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2beta.GetPolicyRequest other = (com.google.iam.v2beta.GetPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.GetPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.GetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `GetPolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.GetPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.GetPolicyRequest) + com.google.iam.v2beta.GetPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.GetPolicyRequest.class, + com.google.iam.v2beta.GetPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2beta.GetPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.GetPolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.GetPolicyRequest build() { + com.google.iam.v2beta.GetPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.GetPolicyRequest buildPartial() { + com.google.iam.v2beta.GetPolicyRequest result = + new com.google.iam.v2beta.GetPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.GetPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.GetPolicyRequest) { + return mergeFrom((com.google.iam.v2beta.GetPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.GetPolicyRequest other) { + if (other == com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the policy to retrieve. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * Use the URL-encoded full resource name, which means that the forward-slash
+     * character, `/`, must be written as `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.GetPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.GetPolicyRequest) + private static final com.google.iam.v2beta.GetPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.GetPolicyRequest(); + } + + public static com.google.iam.v2beta.GetPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.GetPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..d0ae9bb6c082 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface GetPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.GetPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the policy to retrieve. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * Use the URL-encoded full resource name, which means that the forward-slash
+   * character, `/`, must be written as `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java new file mode 100644 index 000000000000..ccb7a8ba608a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java @@ -0,0 +1,969 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Request message for `ListPolicies`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.ListPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListPoliciesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.ListPoliciesRequest) + ListPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPoliciesRequest"); + } + + // Use ListPoliciesRequest.newBuilder() to construct. + private ListPoliciesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.ListPoliciesRequest.class, + com.google.iam.v2beta.ListPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of policies to return. IAM ignores this value and uses
+   * the value 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.ListPoliciesRequest)) { + return super.equals(obj); + } + com.google.iam.v2beta.ListPoliciesRequest other = + (com.google.iam.v2beta.ListPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.ListPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `ListPolicies`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.ListPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.ListPoliciesRequest) + com.google.iam.v2beta.ListPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.ListPoliciesRequest.class, + com.google.iam.v2beta.ListPoliciesRequest.Builder.class); + } + + // Construct using com.google.iam.v2beta.ListPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesRequest getDefaultInstanceForType() { + return com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesRequest build() { + com.google.iam.v2beta.ListPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesRequest buildPartial() { + com.google.iam.v2beta.ListPoliciesRequest result = + new com.google.iam.v2beta.ListPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.ListPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.ListPoliciesRequest) { + return mergeFrom((com.google.iam.v2beta.ListPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesRequest other) { + if (other == com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, you can use the alphanumeric or the numeric ID.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of policies to return. IAM ignores this value and uses
+     * the value 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.ListPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.ListPoliciesRequest) + private static final com.google.iam.v2beta.ListPoliciesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.ListPoliciesRequest(); + } + + public static com.google.iam.v2beta.ListPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..97904c46e99d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface ListPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.ListPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, you can use the alphanumeric or the numeric ID.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of policies to return. IAM ignores this value and uses
+   * the value 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java new file mode 100644 index 000000000000..0e3d45f31c5f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java @@ -0,0 +1,1112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Response message for `ListPolicies`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.ListPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListPoliciesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.ListPoliciesResponse) + ListPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPoliciesResponse"); + } + + // Use ListPoliciesResponse.newBuilder() to construct. + private ListPoliciesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPoliciesResponse() { + policies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.ListPoliciesResponse.class, + com.google.iam.v2beta.ListPoliciesResponse.Builder.class); + } + + public static final int POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policies_; + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + @java.lang.Override + public java.util.List getPoliciesList() { + return policies_; + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + @java.lang.Override + public java.util.List + getPoliciesOrBuilderList() { + return policies_; + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + @java.lang.Override + public int getPoliciesCount() { + return policies_.size(); + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + @java.lang.Override + public com.google.iam.v2beta.Policy getPolicies(int index) { + return policies_.get(index); + } + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + @java.lang.Override + public com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index) { + return policies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policies_.size(); i++) { + output.writeMessage(1, policies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.ListPoliciesResponse)) { + return super.equals(obj); + } + com.google.iam.v2beta.ListPoliciesResponse other = + (com.google.iam.v2beta.ListPoliciesResponse) obj; + + if (!getPoliciesList().equals(other.getPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPoliciesCount() > 0) { + hash = (37 * hash) + POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.ListPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for `ListPolicies`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.ListPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.ListPoliciesResponse) + com.google.iam.v2beta.ListPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.ListPoliciesResponse.class, + com.google.iam.v2beta.ListPoliciesResponse.Builder.class); + } + + // Construct using com.google.iam.v2beta.ListPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + } else { + policies_ = null; + policiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesResponse getDefaultInstanceForType() { + return com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesResponse build() { + com.google.iam.v2beta.ListPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesResponse buildPartial() { + com.google.iam.v2beta.ListPoliciesResponse result = + new com.google.iam.v2beta.ListPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v2beta.ListPoliciesResponse result) { + if (policiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policies_ = java.util.Collections.unmodifiableList(policies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policies_ = policies_; + } else { + result.policies_ = policiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v2beta.ListPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.ListPoliciesResponse) { + return mergeFrom((com.google.iam.v2beta.ListPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesResponse other) { + if (other == com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance()) return this; + if (policiesBuilder_ == null) { + if (!other.policies_.isEmpty()) { + if (policies_.isEmpty()) { + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePoliciesIsMutable(); + policies_.addAll(other.policies_); + } + onChanged(); + } + } else { + if (!other.policies_.isEmpty()) { + if (policiesBuilder_.isEmpty()) { + policiesBuilder_.dispose(); + policiesBuilder_ = null; + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + policiesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPoliciesFieldBuilder() + : null; + } else { + policiesBuilder_.addAllMessages(other.policies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v2beta.Policy m = + input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policies_ = + java.util.Collections.emptyList(); + + private void ensurePoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policies_ = new java.util.ArrayList(policies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + policiesBuilder_; + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public java.util.List getPoliciesList() { + if (policiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(policies_); + } else { + return policiesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public int getPoliciesCount() { + if (policiesBuilder_ == null) { + return policies_.size(); + } else { + return policiesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public com.google.iam.v2beta.Policy getPolicies(int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); + } else { + return policiesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder setPolicies(int index, com.google.iam.v2beta.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.set(index, value); + onChanged(); + } else { + policiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder setPolicies(int index, com.google.iam.v2beta.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.set(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder addPolicies(com.google.iam.v2beta.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(value); + onChanged(); + } else { + policiesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder addPolicies(int index, com.google.iam.v2beta.Policy value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(index, value); + onChanged(); + } else { + policiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder addPolicies(com.google.iam.v2beta.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder addPolicies(int index, com.google.iam.v2beta.Policy.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder addAllPolicies( + java.lang.Iterable values) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); + onChanged(); + } else { + policiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder clearPolicies() { + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public Builder removePolicies(int index) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.remove(index); + onChanged(); + } else { + policiesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public com.google.iam.v2beta.Policy.Builder getPoliciesBuilder(int index) { + return internalGetPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); + } else { + return policiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public java.util.List + getPoliciesOrBuilderList() { + if (policiesBuilder_ != null) { + return policiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policies_); + } + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public com.google.iam.v2beta.Policy.Builder addPoliciesBuilder() { + return internalGetPoliciesFieldBuilder() + .addBuilder(com.google.iam.v2beta.Policy.getDefaultInstance()); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public com.google.iam.v2beta.Policy.Builder addPoliciesBuilder(int index) { + return internalGetPoliciesFieldBuilder() + .addBuilder(index, com.google.iam.v2beta.Policy.getDefaultInstance()); + } + + /** + * + * + *
+     * Metadata for the policies that are attached to the resource.
+     * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + public java.util.List getPoliciesBuilderList() { + return internalGetPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + internalGetPoliciesFieldBuilder() { + if (policiesBuilder_ == null) { + policiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder>( + policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policies_ = null; + } + return policiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+     * next page. If this field is omitted, there are no additional pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.ListPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.ListPoliciesResponse) + private static final com.google.iam.v2beta.ListPoliciesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.ListPoliciesResponse(); + } + + public static com.google.iam.v2beta.ListPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.ListPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..0f9b0f82d83a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface ListPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.ListPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + java.util.List getPoliciesList(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + com.google.iam.v2beta.Policy getPolicies(int index); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + int getPoliciesCount(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + java.util.List getPoliciesOrBuilderList(); + + /** + * + * + *
+   * Metadata for the policies that are attached to the resource.
+   * 
+ * + * repeated .google.iam.v2beta.Policy policies = 1; + */ + com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index); + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
+   * next page. If this field is omitted, there are no additional pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/Policy.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/Policy.java new file mode 100644 index 000000000000..ab8270f3ec77 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/Policy.java @@ -0,0 +1,3272 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Data for an IAM policy.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.Policy} + */ +@com.google.protobuf.Generated +public final class Policy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.Policy) + PolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Policy"); + } + + // Use Policy.newBuilder() to construct. + private Policy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Policy() { + name_ = ""; + uid_ = ""; + kind_ = ""; + displayName_ = ""; + etag_ = ""; + rules_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.Policy.class, com.google.iam.v2beta.Policy.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int RULES_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List rules_; + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + @java.lang.Override + public com.google.iam.v2beta.PolicyRule getRules(int index) { + return rules_.get(index); + } + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + @java.lang.Override + public com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, etag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getDeleteTime()); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(10, rules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, etag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeleteTime()); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.Policy)) { + return super.equals(obj); + } + com.google.iam.v2beta.Policy other = (com.google.iam.v2beta.Policy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.Policy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.Policy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.Policy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.Policy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.Policy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.Policy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.Policy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.Policy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.Policy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.Policy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.Policy parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.Policy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.Policy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Data for an IAM policy.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.Policy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.Policy) + com.google.iam.v2beta.PolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.Policy.class, com.google.iam.v2beta.Policy.Builder.class); + } + + // Construct using com.google.iam.v2beta.Policy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); + internalGetRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + kind_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + etag_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.Policy getDefaultInstanceForType() { + return com.google.iam.v2beta.Policy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.Policy build() { + com.google.iam.v2beta.Policy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.Policy buildPartial() { + com.google.iam.v2beta.Policy result = new com.google.iam.v2beta.Policy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v2beta.Policy result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v2beta.Policy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.etag_ = etag_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.Policy) { + return mergeFrom((com.google.iam.v2beta.Policy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.Policy other) { + if (other == com.google.iam.v2beta.Policy.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000200); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.iam.v2beta.PolicyRule m = + input.readMessage(com.google.iam.v2beta.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The resource name of the `Policy`, which must be unique. Format:
+     * `policies/{attachment_point}/denypolicies/{policy_id}`
+     *
+     *
+     * The attachment point is identified by its URL-encoded full resource name,
+     * which means that the forward-slash character, `/`, must be written as
+     * `%2F`. For example,
+     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+     *
+     * For organizations and folders, use the numeric ID in the full resource
+     * name. For projects, requests can use the alphanumeric or the numeric ID.
+     * Responses always contain the numeric ID.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+     * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the `Policy`. This value can be up to 63
+     * characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * A key-value map to store arbitrary metadata for the `Policy`. Keys
+     * can be up to 63 characters. Values can be up to 255 characters.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * An opaque tag that identifies the current version of the `Policy`. IAM uses
+     * this value to help manage concurrent updates, so they do not cause one
+     * update to be overwritten by another.
+     *
+     * If this field is present in a [CreatePolicy][] request, the value is
+     * ignored.
+     * 
+ * + * string etag = 6; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000100); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.PolicyRule, + com.google.iam.v2beta.PolicyRule.Builder, + com.google.iam.v2beta.PolicyRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public com.google.iam.v2beta.PolicyRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder setRules(int index, com.google.iam.v2beta.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder setRules(int index, com.google.iam.v2beta.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder addRules(com.google.iam.v2beta.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder addRules(int index, com.google.iam.v2beta.PolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder addRules(com.google.iam.v2beta.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder addRules(int index, com.google.iam.v2beta.PolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public com.google.iam.v2beta.PolicyRule.Builder getRulesBuilder(int index) { + return internalGetRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public com.google.iam.v2beta.PolicyRule.Builder addRulesBuilder() { + return internalGetRulesFieldBuilder() + .addBuilder(com.google.iam.v2beta.PolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public com.google.iam.v2beta.PolicyRule.Builder addRulesBuilder(int index) { + return internalGetRulesFieldBuilder() + .addBuilder(index, com.google.iam.v2beta.PolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of rules that specify the behavior of the `Policy`. All of the rules
+     * should be of the `kind` specified in the `Policy`.
+     * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + public java.util.List getRulesBuilderList() { + return internalGetRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.PolicyRule, + com.google.iam.v2beta.PolicyRule.Builder, + com.google.iam.v2beta.PolicyRuleOrBuilder> + internalGetRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v2beta.PolicyRule, + com.google.iam.v2beta.PolicyRule.Builder, + com.google.iam.v2beta.PolicyRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.Policy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.Policy) + private static final com.google.iam.v2beta.Policy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.Policy(); + } + + public static com.google.iam.v2beta.Policy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Policy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.Policy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java new file mode 100644 index 000000000000..41b561e459c5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java @@ -0,0 +1,693 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Metadata for long-running `Policy` operations.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.PolicyOperationMetadata} + */ +@com.google.protobuf.Generated +public final class PolicyOperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.PolicyOperationMetadata) + PolicyOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyOperationMetadata"); + } + + // Use PolicyOperationMetadata.newBuilder() to construct. + private PolicyOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.PolicyOperationMetadata.class, + com.google.iam.v2beta.PolicyOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.PolicyOperationMetadata)) { + return super.equals(obj); + } + com.google.iam.v2beta.PolicyOperationMetadata other = + (com.google.iam.v2beta.PolicyOperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.PolicyOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for long-running `Policy` operations.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.PolicyOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.PolicyOperationMetadata) + com.google.iam.v2beta.PolicyOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.PolicyOperationMetadata.class, + com.google.iam.v2beta.PolicyOperationMetadata.Builder.class); + } + + // Construct using com.google.iam.v2beta.PolicyOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstanceForType() { + return com.google.iam.v2beta.PolicyOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyOperationMetadata build() { + com.google.iam.v2beta.PolicyOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyOperationMetadata buildPartial() { + com.google.iam.v2beta.PolicyOperationMetadata result = + new com.google.iam.v2beta.PolicyOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.PolicyOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.PolicyOperationMetadata) { + return mergeFrom((com.google.iam.v2beta.PolicyOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.PolicyOperationMetadata other) { + if (other == com.google.iam.v2beta.PolicyOperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Timestamp when the `google.longrunning.Operation` was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.PolicyOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.PolicyOperationMetadata) + private static final com.google.iam.v2beta.PolicyOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.PolicyOperationMetadata(); + } + + public static com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7815428cf7c0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface PolicyOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.PolicyOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Timestamp when the `google.longrunning.Operation` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java new file mode 100644 index 000000000000..2801496c5852 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java @@ -0,0 +1,442 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface PolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.Policy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The resource name of the `Policy`, which must be unique. Format:
+   * `policies/{attachment_point}/denypolicies/{policy_id}`
+   *
+   *
+   * The attachment point is identified by its URL-encoded full resource name,
+   * which means that the forward-slash character, `/`, must be written as
+   * `%2F`. For example,
+   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
+   *
+   * For organizations and folders, use the numeric ID in the full resource
+   * name. For projects, requests can use the alphanumeric or the numeric ID.
+   * Responses always contain the numeric ID.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + java.lang.String getKind(); + + /** + * + * + *
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
+   * 
+ * + * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * A user-specified description of the `Policy`. This value can be up to 63
+   * characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * A key-value map to store arbitrary metadata for the `Policy`. Keys
+   * can be up to 63 characters. Values can be up to 255 characters.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * An opaque tag that identifies the current version of the `Policy`. IAM uses
+   * this value to help manage concurrent updates, so they do not cause one
+   * update to be overwritten by another.
+   *
+   * If this field is present in a [CreatePolicy][] request, the value is
+   * ignored.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + java.util.List getRulesList(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + com.google.iam.v2beta.PolicyRule getRules(int index); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + int getRulesCount(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + java.util.List getRulesOrBuilderList(); + + /** + * + * + *
+   * A list of rules that specify the behavior of the `Policy`. All of the rules
+   * should be of the `kind` specified in the `Policy`.
+   * 
+ * + * repeated .google.iam.v2beta.PolicyRule rules = 10; + */ + com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java new file mode 100644 index 000000000000..ff54ed677662 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java @@ -0,0 +1,280 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public final class PolicyProto extends com.google.protobuf.GeneratedFile { + private PolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_Policy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_Policy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_Policy_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_PolicyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "\036google/iam/v2beta/policy.proto\022\021google" + + ".iam.v2beta\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\034google/iam/v2beta/d" + + "eny.proto\032#google/longrunning/operations" + + ".proto\032\037google/protobuf/timestamp.proto\"\251\003\n" + + "\006Policy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\022\020\n" + + "\003uid\030\002 \001(\tB\003\340A\005\022\021\n" + + "\004kind\030\003 \001(\tB\003\340A\003\022\024\n" + + "\014display_name\030\004 \001(\t\022?\n" + + "\013annotations\030\005" + + " \003(\0132*.google.iam.v2beta.Policy.AnnotationsEntry\022\014\n" + + "\004etag\030\006 \001(\t\0224\n" + + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013delete_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022,\n" + + "\005rules\030\n" + + " \003(\0132\035.google.iam.v2beta.PolicyRule\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"[\n\n" + + "PolicyRule\0220\n" + + "\tdeny_rule\030\002 \001(\0132\033.google.iam.v2beta.DenyRuleH\000\022\023\n" + + "\013description\030\001 \001(\tB\006\n" + + "\004kind\"Q\n" + + "\023ListPoliciesRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"\\\n" + + "\024ListPoliciesResponse\022+\n" + + "\010policies\030\001 \003(\0132\031.google.iam.v2beta.Policy\022\027\n" + + "\017next_page_token\030\002 \001(\t\"%\n" + + "\020GetPolicyRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\"m\n" + + "\023CreatePolicyRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022.\n" + + "\006policy\030\002 \001(\0132\031.google.iam.v2beta.PolicyB\003\340A\002\022\021\n" + + "\tpolicy_id\030\003 \001(\t\"E\n" + + "\023UpdatePolicyRequest\022.\n" + + "\006policy\030\001 \001(\0132\031.google.iam.v2beta.PolicyB\003\340A\002\";\n" + + "\023DeletePolicyRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\"J\n" + + "\027PolicyOperationMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp2\200\007\n" + + "\010Policies\022\217\001\n" + + "\014ListPolicies\022&.google.iam.v2beta.ListPoliciesRe" + + "quest\032\'.google.iam.v2beta.ListPoliciesRe" + + "sponse\".\332A\006parent\202\323\344\223\002\037\022\035/v2beta/{parent=policies/*/*}\022y\n" + + "\tGetPolicy\022#.google.iam.v2beta.GetPolicyRequest\032\031.google.iam.v2" + + "beta.Policy\",\332A\004name\202\323\344\223\002\037\022\035/v2beta/{name=policies/*/*/*}\022\302\001\n" + + "\014CreatePolicy\022&.goo" + + "gle.iam.v2beta.CreatePolicyRequest\032\035.google.longrunning.Operation\"k\312A!\n" + + "\006Policy\022\027PolicyOperationMetadata\332A\027parent,policy," + + "policy_id\202\323\344\223\002\'\"\035/v2beta/{parent=policies/*/*}:\006policy\022\257\001\n" + + "\014UpdatePolicy\022&.google" + + ".iam.v2beta.UpdatePolicyRequest\032\035.google.longrunning.Operation\"X\312A!\n" + + "\006Policy\022\027Pol" + + "icyOperationMetadata\202\323\344\223\002.\032$/v2beta/{policy.name=policies/*/*/*}:\006policy\022\247\001\n" + + "\014DeletePolicy\022&.google.iam.v2beta.DeletePoli" + + "cyRequest\032\035.google.longrunning.Operation\"P\312A!\n" + + "\006Policy\022\027PolicyOperationMetadata\332A" + + "\004name\202\323\344\223\002\037*\035/v2beta/{name=policies/*/*/" + + "*}\032F\312A\022iam.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\211\001\n" + + "\025com.google.iam.v2betaB\013PolicyProtoP\001Z-clo" + + "ud.google.com/go/iam/apiv2beta/iampb;iam" + + "pb\252\002\027Google.Cloud.Iam.V2Beta\312\002\027Google\\Cloud\\Iam\\V2betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.iam.v2beta.DenyRuleProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v2beta_Policy_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v2beta_Policy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_Policy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Kind", + "DisplayName", + "Annotations", + "Etag", + "CreateTime", + "UpdateTime", + "DeleteTime", + "Rules", + }); + internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor = + internal_static_google_iam_v2beta_Policy_descriptor.getNestedType(0); + internal_static_google_iam_v2beta_Policy_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_iam_v2beta_PolicyRule_descriptor = getDescriptor().getMessageType(1); + internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_PolicyRule_descriptor, + new java.lang.String[] { + "DenyRule", "Description", "Kind", + }); + internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor, + new java.lang.String[] { + "Policies", "NextPageToken", + }); + internal_static_google_iam_v2beta_GetPolicyRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_GetPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor, + new java.lang.String[] { + "Parent", "Policy", "PolicyId", + }); + internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor, + new java.lang.String[] { + "Policy", + }); + internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.iam.v2beta.DenyRuleProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java new file mode 100644 index 000000000000..a16dfe19520b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java @@ -0,0 +1,982 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * A single rule in a `Policy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.PolicyRule} + */ +@com.google.protobuf.Generated +public final class PolicyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.PolicyRule) + PolicyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyRule"); + } + + // Use PolicyRule.newBuilder() to construct. + private PolicyRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyRule() { + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.PolicyRule.class, com.google.iam.v2beta.PolicyRule.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DENY_RULE(2), + KIND_NOT_SET(0); + private final int value; + + private KindCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 2: + return DENY_RULE; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int DENY_RULE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + @java.lang.Override + public boolean hasDenyRule() { + return kindCase_ == 2; + } + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + @java.lang.Override + public com.google.iam.v2beta.DenyRule getDenyRule() { + if (kindCase_ == 2) { + return (com.google.iam.v2beta.DenyRule) kind_; + } + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + @java.lang.Override + public com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder() { + if (kindCase_ == 2) { + return (com.google.iam.v2beta.DenyRule) kind_; + } + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.iam.v2beta.DenyRule) kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.iam.v2beta.DenyRule) kind_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.PolicyRule)) { + return super.equals(obj); + } + com.google.iam.v2beta.PolicyRule other = (com.google.iam.v2beta.PolicyRule) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (!getDenyRule().equals(other.getDenyRule())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (kindCase_) { + case 2: + hash = (37 * hash) + DENY_RULE_FIELD_NUMBER; + hash = (53 * hash) + getDenyRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.PolicyRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.PolicyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.PolicyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A single rule in a `Policy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.PolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.PolicyRule) + com.google.iam.v2beta.PolicyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.PolicyRule.class, + com.google.iam.v2beta.PolicyRule.Builder.class); + } + + // Construct using com.google.iam.v2beta.PolicyRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } + description_ = ""; + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_PolicyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyRule getDefaultInstanceForType() { + return com.google.iam.v2beta.PolicyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyRule build() { + com.google.iam.v2beta.PolicyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyRule buildPartial() { + com.google.iam.v2beta.PolicyRule result = new com.google.iam.v2beta.PolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.PolicyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + } + + private void buildPartialOneofs(com.google.iam.v2beta.PolicyRule result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 2 && denyRuleBuilder_ != null) { + result.kind_ = denyRuleBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.PolicyRule) { + return mergeFrom((com.google.iam.v2beta.PolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.PolicyRule other) { + if (other == com.google.iam.v2beta.PolicyRule.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getKindCase()) { + case DENY_RULE: + { + mergeDenyRule(other.getDenyRule()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.DenyRule, + com.google.iam.v2beta.DenyRule.Builder, + com.google.iam.v2beta.DenyRuleOrBuilder> + denyRuleBuilder_; + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + @java.lang.Override + public boolean hasDenyRule() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + @java.lang.Override + public com.google.iam.v2beta.DenyRule getDenyRule() { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.iam.v2beta.DenyRule) kind_; + } + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return denyRuleBuilder_.getMessage(); + } + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + public Builder setDenyRule(com.google.iam.v2beta.DenyRule value) { + if (denyRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + denyRuleBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + public Builder setDenyRule(com.google.iam.v2beta.DenyRule.Builder builderForValue) { + if (denyRuleBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + denyRuleBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + public Builder mergeDenyRule(com.google.iam.v2beta.DenyRule value) { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2 && kind_ != com.google.iam.v2beta.DenyRule.getDefaultInstance()) { + kind_ = + com.google.iam.v2beta.DenyRule.newBuilder((com.google.iam.v2beta.DenyRule) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + denyRuleBuilder_.mergeFrom(value); + } else { + denyRuleBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + public Builder clearDenyRule() { + if (denyRuleBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + denyRuleBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + public com.google.iam.v2beta.DenyRule.Builder getDenyRuleBuilder() { + return internalGetDenyRuleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + @java.lang.Override + public com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder() { + if ((kindCase_ == 2) && (denyRuleBuilder_ != null)) { + return denyRuleBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.iam.v2beta.DenyRule) kind_; + } + return com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A rule for a deny policy.
+     * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.DenyRule, + com.google.iam.v2beta.DenyRule.Builder, + com.google.iam.v2beta.DenyRuleOrBuilder> + internalGetDenyRuleFieldBuilder() { + if (denyRuleBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.iam.v2beta.DenyRule.getDefaultInstance(); + } + denyRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.DenyRule, + com.google.iam.v2beta.DenyRule.Builder, + com.google.iam.v2beta.DenyRuleOrBuilder>( + (com.google.iam.v2beta.DenyRule) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return denyRuleBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A user-specified description of the rule. This value can be up to 256
+     * characters.
+     * 
+ * + * string description = 1; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.PolicyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.PolicyRule) + private static final com.google.iam.v2beta.PolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.PolicyRule(); + } + + public static com.google.iam.v2beta.PolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.PolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java new file mode 100644 index 000000000000..8430d0eb15fe --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface PolicyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.PolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return Whether the denyRule field is set. + */ + boolean hasDenyRule(); + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + * + * @return The denyRule. + */ + com.google.iam.v2beta.DenyRule getDenyRule(); + + /** + * + * + *
+   * A rule for a deny policy.
+   * 
+ * + * .google.iam.v2beta.DenyRule deny_rule = 2; + */ + com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder(); + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * A user-specified description of the rule. This value can be up to 256
+   * characters.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + com.google.iam.v2beta.PolicyRule.KindCase getKindCase(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java new file mode 100644 index 000000000000..8883e00fd710 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java @@ -0,0 +1,736 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +/** + * + * + *
+ * Request message for `UpdatePolicy`.
+ * 
+ * + * Protobuf type {@code google.iam.v2beta.UpdatePolicyRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v2beta.UpdatePolicyRequest) + UpdatePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePolicyRequest"); + } + + // Use UpdatePolicyRequest.newBuilder() to construct. + private UpdatePolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePolicyRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.UpdatePolicyRequest.class, + com.google.iam.v2beta.UpdatePolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int POLICY_FIELD_NUMBER = 1; + private com.google.iam.v2beta.Policy policy_; + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v2beta.Policy getPolicy() { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v2beta.UpdatePolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v2beta.UpdatePolicyRequest other = + (com.google.iam.v2beta.UpdatePolicyRequest) obj; + + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v2beta.UpdatePolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for `UpdatePolicy`.
+   * 
+ * + * Protobuf type {@code google.iam.v2beta.UpdatePolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v2beta.UpdatePolicyRequest) + com.google.iam.v2beta.UpdatePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v2beta.UpdatePolicyRequest.class, + com.google.iam.v2beta.UpdatePolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v2beta.UpdatePolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v2beta.PolicyProto + .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstanceForType() { + return com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v2beta.UpdatePolicyRequest build() { + com.google.iam.v2beta.UpdatePolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v2beta.UpdatePolicyRequest buildPartial() { + com.google.iam.v2beta.UpdatePolicyRequest result = + new com.google.iam.v2beta.UpdatePolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v2beta.UpdatePolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v2beta.UpdatePolicyRequest) { + return mergeFrom((com.google.iam.v2beta.UpdatePolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v2beta.UpdatePolicyRequest other) { + if (other == com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance()) return this; + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v2beta.Policy policy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + policyBuilder_; + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + public com.google.iam.v2beta.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2beta.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + } else { + policyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPolicy(com.google.iam.v2beta.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePolicy(com.google.iam.v2beta.Policy value) { + if (policyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policy_ != null + && policy_ != com.google.iam.v2beta.Policy.getDefaultInstance()) { + getPolicyBuilder().mergeFrom(value); + } else { + policy_ = value; + } + } else { + policyBuilder_.mergeFrom(value); + } + if (policy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + policy_ = null; + if (policyBuilder_ != null) { + policyBuilder_.dispose(); + policyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2beta.Policy.Builder getPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     *
+     * To prevent conflicting updates, the `etag` value must match the value that
+     * is stored in IAM. If the `etag` values do not match, the request fails with
+     * a `409` error code and `ABORTED` status.
+     * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder> + internalGetPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v2beta.Policy, + com.google.iam.v2beta.Policy.Builder, + com.google.iam.v2beta.PolicyOrBuilder>( + getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v2beta.UpdatePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v2beta.UpdatePolicyRequest) + private static final com.google.iam.v2beta.UpdatePolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v2beta.UpdatePolicyRequest(); + } + + public static com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java new file mode 100644 index 000000000000..df4e96945f58 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v2beta/policy.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v2beta; + +@com.google.protobuf.Generated +public interface UpdatePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v2beta.UpdatePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policy. + */ + com.google.iam.v2beta.Policy getPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   *
+   * To prevent conflicting updates, the `etag` value must match the value that
+   * is stored in IAM. If the `etag` values do not match, the request fails with
+   * a `409` error code and `ABORTED` status.
+   * 
+ * + * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/deny.proto b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/deny.proto new file mode 100644 index 000000000000..2ff6b7446766 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/deny.proto @@ -0,0 +1,109 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v2beta; + +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V2Beta"; +option go_package = "cloud.google.com/go/iam/apiv2beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "DenyRuleProto"; +option java_package = "com.google.iam.v2beta"; +option php_namespace = "Google\\Cloud\\Iam\\V2beta"; + +// A deny rule in an IAM deny policy. +message DenyRule { + // The identities that are prevented from using one or more permissions on + // Google Cloud resources. This field can contain the following values: + // + // * `principalSet://goog/public:all`: A special identifier that represents + // any principal that is on the internet, even if they do not have a Google + // Account or are not logged in. + // + // * `principal://goog/subject/{email_id}`: A specific Google Account. + // Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + // example, `principal://goog/subject/alice@example.com`. + // + // * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + // Google Account that was deleted recently. For example, + // `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + // the Google Account is recovered, this identifier reverts to the standard + // identifier for a Google Account. + // + // * `principalSet://goog/group/{group_id}`: A Google group. For example, + // `principalSet://goog/group/admins@example.com`. + // + // * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + // that was deleted recently. For example, + // `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + // the Google group is restored, this identifier reverts to the standard + // identifier for a Google group. + // + // * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + // A Google Cloud service account. For example, + // `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + // + // * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + // A Google Cloud service account that was deleted recently. For example, + // `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + // If the service account is undeleted, this identifier reverts to the + // standard identifier for a service account. + // + // * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + // principals associated with the specified Google Workspace or Cloud + // Identity customer ID. For example, + // `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + repeated string denied_principals = 1; + + // The identities that are excluded from the deny rule, even if they are + // listed in the `denied_principals`. For example, you could add a Google + // group to the `denied_principals`, then exclude specific users who belong to + // that group. + // + // This field can contain the same values as the `denied_principals` field, + // excluding `principalSet://goog/public:all`, which represents all users on + // the internet. + repeated string exception_principals = 2; + + // The permissions that are explicitly denied by this rule. Each permission + // uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + // is the fully qualified domain name for the service. For example, + // `iam.googleapis.com/roles.list`. + repeated string denied_permissions = 3; + + // Specifies the permissions that this rule excludes from the set of denied + // permissions given by `denied_permissions`. If a permission appears in + // `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + // denied. + // + // The excluded permissions can be specified using the same syntax as + // `denied_permissions`. + repeated string exception_permissions = 4; + + // The condition that determines whether this deny rule applies to a request. + // If the condition expression evaluates to `true`, then the deny rule is + // applied; otherwise, the deny rule is not applied. + // + // Each deny rule is evaluated independently. If this deny rule does not apply + // to a request, other deny rules might still apply. + // + // The condition can use CEL functions that evaluate + // [resource + // tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + // functions and operators are not supported. + google.type.Expr denial_condition = 5; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/policy.proto b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/policy.proto new file mode 100644 index 000000000000..7c3fa35f66fd --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v2beta/src/main/proto/google/iam/v2beta/policy.proto @@ -0,0 +1,283 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v2beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/iam/v2beta/deny.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V2Beta"; +option go_package = "cloud.google.com/go/iam/apiv2beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.iam.v2beta"; +option php_namespace = "Google\\Cloud\\Iam\\V2beta"; + +// An interface for managing Identity and Access Management (IAM) policies. +service Policies { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Retrieves the policies of the specified kind that are attached to a + // resource. + // + // The response lists only policy metadata. In particular, policy rules are + // omitted. + rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) { + option (google.api.http) = { + get: "/v2beta/{parent=policies/*/*}" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a policy. + rpc GetPolicy(GetPolicyRequest) returns (Policy) { + option (google.api.http) = { + get: "/v2beta/{name=policies/*/*/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a policy. + rpc CreatePolicy(CreatePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta/{parent=policies/*/*}" + body: "policy" + }; + option (google.api.method_signature) = "parent,policy,policy_id"; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } + + // Updates the specified policy. + // + // You can update only the rules and the display name for the policy. + // + // To update a policy, you should use a read-modify-write loop: + // + // 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy. + // 2. Modify the policy as needed. + // 3. Use `UpdatePolicy` to write the updated policy. + // + // This pattern helps prevent conflicts between concurrent updates. + rpc UpdatePolicy(UpdatePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + put: "/v2beta/{policy.name=policies/*/*/*}" + body: "policy" + }; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } + + // Deletes a policy. This action is permanent. + rpc DeletePolicy(DeletePolicyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2beta/{name=policies/*/*/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Policy" + metadata_type: "PolicyOperationMetadata" + }; + } +} + +// Data for an IAM policy. +message Policy { + // Immutable. The resource name of the `Policy`, which must be unique. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, requests can use the alphanumeric or the numeric ID. + // Responses always contain the numeric ID. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + // `Policy` is created. + string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-specified description of the `Policy`. This value can be up to 63 + // characters. + string display_name = 4; + + // A key-value map to store arbitrary metadata for the `Policy`. Keys + // can be up to 63 characters. Values can be up to 255 characters. + map annotations = 5; + + // An opaque tag that identifies the current version of the `Policy`. IAM uses + // this value to help manage concurrent updates, so they do not cause one + // update to be overwritten by another. + // + // If this field is present in a [CreatePolicy][] request, the value is + // ignored. + string etag = 6; + + // Output only. The time when the `Policy` was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the `Policy` was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A list of rules that specify the behavior of the `Policy`. All of the rules + // should be of the `kind` specified in the `Policy`. + repeated PolicyRule rules = 10; +} + +// A single rule in a `Policy`. +message PolicyRule { + oneof kind { + // A rule for a deny policy. + DenyRule deny_rule = 2; + } + + // A user-specified description of the rule. This value can be up to 256 + // characters. + string description = 1; +} + +// Request message for `ListPolicies`. +message ListPoliciesRequest { + // Required. The resource that the policy is attached to, along with the kind of policy + // to list. Format: + // `policies/{attachment_point}/denypolicies` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of policies to return. IAM ignores this value and uses + // the value 1000. + int32 page_size = 2; + + // A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to + // retrieve the next page. + string page_token = 3; +} + +// Response message for `ListPolicies`. +message ListPoliciesResponse { + // Metadata for the policies that are attached to the resource. + repeated Policy policies = 1; + + // A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the + // next page. If this field is omitted, there are no additional pages. + string next_page_token = 2; +} + +// Request message for `GetPolicy`. +message GetPolicyRequest { + // Required. The resource name of the policy to retrieve. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // Use the URL-encoded full resource name, which means that the forward-slash + // character, `/`, must be written as `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `CreatePolicy`. +message CreatePolicyRequest { + // Required. The resource that the policy is attached to, along with the kind of policy + // to create. Format: `policies/{attachment_point}/denypolicies` + // + // + // The attachment point is identified by its URL-encoded full resource name, + // which means that the forward-slash character, `/`, must be written as + // `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The policy to create. + Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; + + // The ID to use for this policy, which will become the final component of + // the policy's resource name. The ID must contain 3 to 63 characters. It can + // contain lowercase letters and numbers, as well as dashes (`-`) and periods + // (`.`). The first character must be a lowercase letter. + string policy_id = 3; +} + +// Request message for `UpdatePolicy`. +message UpdatePolicyRequest { + // Required. The policy to update. + // + // To prevent conflicting updates, the `etag` value must match the value that + // is stored in IAM. If the `etag` values do not match, the request fails with + // a `409` error code and `ABORTED` status. + Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `DeletePolicy`. +message DeletePolicyRequest { + // Required. The resource name of the policy to delete. Format: + // `policies/{attachment_point}/denypolicies/{policy_id}` + // + // + // Use the URL-encoded full resource name, which means that the forward-slash + // character, `/`, must be written as `%2F`. For example, + // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + // + // For organizations and folders, use the numeric ID in the full resource + // name. For projects, you can use the alphanumeric or the numeric ID. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The expected `etag` of the policy to delete. If the value does not match + // the value that is stored in IAM, the request fails with a `409` error code + // and `ABORTED` status. + // + // If you omit this field, the policy is deleted regardless of its current + // `etag`. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata for long-running `Policy` operations. +message PolicyOperationMetadata { + // Timestamp when the `google.longrunning.Operation` was created. + google.protobuf.Timestamp create_time = 1; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/pom.xml b/java-common-iam/proto-proto-google-iam-v1-v3/pom.xml new file mode 100644 index 000000000000..8cd88bb481a4 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3 + 1.65.0 + proto-proto-google-iam-v1-v3 + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequest.java new file mode 100644 index 000000000000..6c9c4177bec2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequest.java @@ -0,0 +1,1314 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for CreatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.CreatePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class CreatePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.CreatePolicyBindingRequest) + CreatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePolicyBindingRequest"); + } + + // Use CreatePolicyBindingRequest.newBuilder() to construct. + private CreatePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePolicyBindingRequest() { + parent_ = ""; + policyBindingId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.CreatePolicyBindingRequest.class, + com.google.iam.v3.CreatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + @java.lang.Override + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBindingId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_FIELD_NUMBER = 3; + private com.google.iam.v3.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBindingId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBindingId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.CreatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3.CreatePolicyBindingRequest other = + (com.google.iam.v3.CreatePolicyBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPolicyBindingId().equals(other.getPolicyBindingId())) return false; + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + POLICY_BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingId().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.CreatePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.CreatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.CreatePolicyBindingRequest) + com.google.iam.v3.CreatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.CreatePolicyBindingRequest.class, + com.google.iam.v3.CreatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3.CreatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policyBindingId_ = ""; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.CreatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3.CreatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.CreatePolicyBindingRequest build() { + com.google.iam.v3.CreatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.CreatePolicyBindingRequest buildPartial() { + com.google.iam.v3.CreatePolicyBindingRequest result = + new com.google.iam.v3.CreatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.CreatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyBindingId_ = policyBindingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.CreatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3.CreatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.CreatePolicyBindingRequest other) { + if (other == com.google.iam.v3.CreatePolicyBindingRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPolicyBindingId().isEmpty()) { + policyBindingId_ = other.policyBindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + policyBindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyBindingId() { + policyBindingId_ = getDefaultInstance().getPolicyBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + internalGetPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.CreatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.CreatePolicyBindingRequest) + private static final com.google.iam.v3.CreatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.CreatePolicyBindingRequest(); + } + + public static com.google.iam.v3.CreatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.CreatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..2308f6f5688f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface CreatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.CreatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + java.lang.String getPolicyBindingId(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + com.google.protobuf.ByteString getPolicyBindingIdBytes(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..c9339b0fc45c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class CreatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) + CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePrincipalAccessBoundaryPolicyRequest"); + } + + // Use CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private CreatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePrincipalAccessBoundaryPolicyRequest() { + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalAccessBoundaryPolicyId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 3; + private com.google.iam.v3.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(principalAccessBoundaryPolicyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(principalAccessBoundaryPolicyId_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPrincipalAccessBoundaryPolicyId().equals(other.getPrincipalAccessBoundaryPolicyId())) + return false; + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicyId().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPrincipalAccessBoundaryPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principalAccessBoundaryPolicyId_ = principalAccessBoundaryPolicyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPrincipalAccessBoundaryPolicyId().isEmpty()) { + principalAccessBoundaryPolicyId_ = other.principalAccessBoundaryPolicyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + principalAccessBoundaryPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalAccessBoundaryPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrincipalAccessBoundaryPolicyId() { + principalAccessBoundaryPolicyId_ = getDefaultInstance().getPrincipalAccessBoundaryPolicyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000004); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..b6d0126f3145 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface CreatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + java.lang.String getPrincipalAccessBoundaryPolicyId(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequest.java new file mode 100644 index 000000000000..0b9cd14a859a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for DeletePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.DeletePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class DeletePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.DeletePolicyBindingRequest) + DeletePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePolicyBindingRequest"); + } + + // Use DeletePolicyBindingRequest.newBuilder() to construct. + private DeletePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePolicyBindingRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.DeletePolicyBindingRequest.class, + com.google.iam.v3.DeletePolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.DeletePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3.DeletePolicyBindingRequest other = + (com.google.iam.v3.DeletePolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.DeletePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeletePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.DeletePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.DeletePolicyBindingRequest) + com.google.iam.v3.DeletePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.DeletePolicyBindingRequest.class, + com.google.iam.v3.DeletePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3.DeletePolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.DeletePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3.DeletePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.DeletePolicyBindingRequest build() { + com.google.iam.v3.DeletePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.DeletePolicyBindingRequest buildPartial() { + com.google.iam.v3.DeletePolicyBindingRequest result = + new com.google.iam.v3.DeletePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.DeletePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.DeletePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3.DeletePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.DeletePolicyBindingRequest other) { + if (other == com.google.iam.v3.DeletePolicyBindingRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.DeletePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.DeletePolicyBindingRequest) + private static final com.google.iam.v3.DeletePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.DeletePolicyBindingRequest(); + } + + public static com.google.iam.v3.DeletePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.DeletePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..bb629d0996b5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePolicyBindingRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface DeletePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.DeletePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..3c7036a0ae39 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1038 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for DeletePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class DeletePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) + DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePrincipalAccessBoundaryPolicyRequest"); + } + + // Use DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private DeletePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int FORCE_FIELD_NUMBER = 4; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (force_ != false) { + output.writeBool(4, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeletePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + force_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000008); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..7f89d5b69f3d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface DeletePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/FolderLocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/FolderLocationName.java new file mode 100644 index 000000000000..6d7ef2b63973 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/FolderLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FolderLocationName implements ResourceName { + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String folder; + private final String location; + + @Deprecated + protected FolderLocationName() { + folder = null; + location = null; + } + + private FolderLocationName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderLocationName of(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static String format(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static FolderLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER_LOCATION.validatedMatch( + formattedString, "FolderLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("folder"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FolderLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER_LOCATION.instantiate("folder", folder, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FolderLocationName that = ((FolderLocationName) o); + return Objects.equals(this.folder, that.folder) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for folders/{folder}/locations/{location}. */ + public static class Builder { + private String folder; + private String location; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(FolderLocationName folderLocationName) { + this.folder = folderLocationName.folder; + this.location = folderLocationName.location; + } + + public FolderLocationName build() { + return new FolderLocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequest.java new file mode 100644 index 000000000000..fb44f096bade --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequest.java @@ -0,0 +1,658 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for GetPolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.GetPolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class GetPolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.GetPolicyBindingRequest) + GetPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyBindingRequest"); + } + + // Use GetPolicyBindingRequest.newBuilder() to construct. + private GetPolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.GetPolicyBindingRequest.class, + com.google.iam.v3.GetPolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.GetPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3.GetPolicyBindingRequest other = + (com.google.iam.v3.GetPolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.GetPolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetPolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.GetPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.GetPolicyBindingRequest) + com.google.iam.v3.GetPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.GetPolicyBindingRequest.class, + com.google.iam.v3.GetPolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3.GetPolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.GetPolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3.GetPolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.GetPolicyBindingRequest build() { + com.google.iam.v3.GetPolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.GetPolicyBindingRequest buildPartial() { + com.google.iam.v3.GetPolicyBindingRequest result = + new com.google.iam.v3.GetPolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.GetPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.GetPolicyBindingRequest) { + return mergeFrom((com.google.iam.v3.GetPolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.GetPolicyBindingRequest other) { + if (other == com.google.iam.v3.GetPolicyBindingRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.GetPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.GetPolicyBindingRequest) + private static final com.google.iam.v3.GetPolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.GetPolicyBindingRequest(); + } + + public static com.google.iam.v3.GetPolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.GetPolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..2b28872f9ba3 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPolicyBindingRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface GetPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.GetPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..e124bbf441ab --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for GetPrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetPrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) + GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPrincipalAccessBoundaryPolicyRequest"); + } + + // Use GetPrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private GetPrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetPrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest other) { + if (other == com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..2ecc1da78eda --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface GetPrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequest.java new file mode 100644 index 000000000000..86ed9efc8abc --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequest.java @@ -0,0 +1,1254 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.ListPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class ListPolicyBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.ListPolicyBindingsRequest) + ListPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBindingsRequest"); + } + + // Use ListPolicyBindingsRequest.newBuilder() to construct. + private ListPolicyBindingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPolicyBindingsRequest.class, + com.google.iam.v3.ListPolicyBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.ListPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3.ListPolicyBindingsRequest other = + (com.google.iam.v3.ListPolicyBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.ListPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.ListPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.ListPolicyBindingsRequest) + com.google.iam.v3.ListPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPolicyBindingsRequest.class, + com.google.iam.v3.ListPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3.ListPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3.ListPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsRequest build() { + com.google.iam.v3.ListPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsRequest buildPartial() { + com.google.iam.v3.ListPolicyBindingsRequest result = + new com.google.iam.v3.ListPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.ListPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.ListPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3.ListPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.ListPolicyBindingsRequest other) { + if (other == com.google.iam.v3.ListPolicyBindingsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.ListPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.ListPolicyBindingsRequest) + private static final com.google.iam.v3.ListPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.ListPolicyBindingsRequest(); + } + + public static com.google.iam.v3.ListPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..975e3aa6b1c6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface ListPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.ListPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponse.java new file mode 100644 index 000000000000..8d4e077d3548 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponse.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Response message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.ListPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class ListPolicyBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.ListPolicyBindingsResponse) + ListPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBindingsResponse"); + } + + // Use ListPolicyBindingsResponse.newBuilder() to construct. + private ListPolicyBindingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPolicyBindingsResponse.class, + com.google.iam.v3.ListPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.ListPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3.ListPolicyBindingsResponse other = + (com.google.iam.v3.ListPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.ListPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.ListPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.ListPolicyBindingsResponse) + com.google.iam.v3.ListPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPolicyBindingsResponse.class, + com.google.iam.v3.ListPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3.ListPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3.ListPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsResponse build() { + com.google.iam.v3.ListPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsResponse buildPartial() { + com.google.iam.v3.ListPolicyBindingsResponse result = + new com.google.iam.v3.ListPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.iam.v3.ListPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3.ListPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.ListPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3.ListPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.ListPolicyBindingsResponse other) { + if (other == com.google.iam.v3.ListPolicyBindingsResponse.getDefaultInstance()) return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3.PolicyBinding m = + input.readMessage(com.google.iam.v3.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.ListPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.ListPolicyBindingsResponse) + private static final com.google.iam.v3.ListPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.ListPolicyBindingsResponse(); + } + + public static com.google.iam.v3.ListPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.ListPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..bcb12ca8cde7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface ListPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.ListPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequest.java new file mode 100644 index 000000000000..817a2edc08f5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequest.java @@ -0,0 +1,995 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListPrincipalAccessBoundaryPoliciesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) + ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPrincipalAccessBoundaryPoliciesRequest"); + } + + // Use ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest)) { + return super.equals(obj); + } + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest other = + (com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + // Construct using com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstanceForType() { + return com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest build() { + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest buildPartial() { + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest result = + new com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) { + return mergeFrom((com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest other) { + if (other + == com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) + private static final com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest(); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..deb488e915e6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface ListPrincipalAccessBoundaryPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponse.java new file mode 100644 index 000000000000..ab1d9b2af986 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponse.java @@ -0,0 +1,1200 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Response message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListPrincipalAccessBoundaryPoliciesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) + ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPrincipalAccessBoundaryPoliciesResponse"); + } + + // Use ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesResponse() { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + principalAccessBoundaryPolicies_; + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public int getPrincipalAccessBoundaryPoliciesCount() { + return principalAccessBoundaryPolicies_.size(); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < principalAccessBoundaryPolicies_.size(); i++) { + output.writeMessage(1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < principalAccessBoundaryPolicies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse)) { + return super.equals(obj); + } + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse other = + (com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) obj; + + if (!getPrincipalAccessBoundaryPoliciesList() + .equals(other.getPrincipalAccessBoundaryPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPrincipalAccessBoundaryPoliciesCount() > 0) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + // Construct using com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + } else { + principalAccessBoundaryPolicies_ = null; + principalAccessBoundaryPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstanceForType() { + return com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse build() { + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse buildPartial() { + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse result = + new com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse result) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPolicies_; + } else { + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) { + return mergeFrom((com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse other) { + if (other + == com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance()) + return this; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPolicies_.isEmpty()) { + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.addAll(other.principalAccessBoundaryPolicies_); + } + onChanged(); + } + } else { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPoliciesBuilder_.isEmpty()) { + principalAccessBoundaryPoliciesBuilder_.dispose(); + principalAccessBoundaryPoliciesBuilder_ = null; + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPoliciesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + : null; + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages( + other.principalAccessBoundaryPolicies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3.PrincipalAccessBoundaryPolicy m = + input.readMessage( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.parser(), + extensionRegistry); + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(m); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + + private void ensurePrincipalAccessBoundaryPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + new java.util.ArrayList( + principalAccessBoundaryPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPoliciesBuilder_; + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public int getPrincipalAccessBoundaryPoliciesCount() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.size(); + } else { + return principalAccessBoundaryPoliciesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addAllPrincipalAccessBoundaryPolicies( + java.lang.Iterable values) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, principalAccessBoundaryPolicies_); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder clearPrincipalAccessBoundaryPolicies() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder removePrincipalAccessBoundaryPolicies(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.remove(index); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPoliciesBuilder(int index) { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + if (principalAccessBoundaryPoliciesBuilder_ != null) { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder() { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder(com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder(int index) { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder(index, com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesBuilderList() { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder>( + principalAccessBoundaryPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + principalAccessBoundaryPolicies_ = null; + } + return principalAccessBoundaryPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) + private static final com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse(); + } + + public static com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..d3b7fc8625d1 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface ListPrincipalAccessBoundaryPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies(int index); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + int getPrincipalAccessBoundaryPoliciesCount(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/LocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/LocationName.java new file mode 100644 index 000000000000..bdd37004f088 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadata.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadata.java new file mode 100644 index 000000000000..7b33d84c75cd --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadata.java @@ -0,0 +1,1865 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.iam.v3.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.OperationMetadataProto + .internal_static_google_iam_v3_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.OperationMetadataProto + .internal_static_google_iam_v3_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.OperationMetadata.class, + com.google.iam.v3.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.OperationMetadata)) { + return super.equals(obj); + } + com.google.iam.v3.OperationMetadata other = (com.google.iam.v3.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.OperationMetadata parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.iam.v3.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.OperationMetadata) + com.google.iam.v3.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.OperationMetadataProto + .internal_static_google_iam_v3_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.OperationMetadataProto + .internal_static_google_iam_v3_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.OperationMetadata.class, + com.google.iam.v3.OperationMetadata.Builder.class); + } + + // Construct using com.google.iam.v3.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.OperationMetadataProto + .internal_static_google_iam_v3_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.OperationMetadata getDefaultInstanceForType() { + return com.google.iam.v3.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.OperationMetadata build() { + com.google.iam.v3.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.OperationMetadata buildPartial() { + com.google.iam.v3.OperationMetadata result = new com.google.iam.v3.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.OperationMetadata) { + return mergeFrom((com.google.iam.v3.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.OperationMetadata other) { + if (other == com.google.iam.v3.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.OperationMetadata) + private static final com.google.iam.v3.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.OperationMetadata(); + } + + public static com.google.iam.v3.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..be674c40b5a8 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataProto.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataProto.java new file mode 100644 index 000000000000..c03fced5131a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OperationMetadataProto.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public final class OperationMetadataProto extends com.google.protobuf.GeneratedFile { + private OperationMetadataProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadataProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "&google/iam/v3/operation_metadata.proto\022\r" + + "google.iam.v3\032\037google/api/field_behavi" + + "or.proto\032\037google/protobuf/timestamp.proto\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\003B\204\001\n" + + "\021com.google.iam.v3B\026OperationMetadataProtoP\001Z)cloud.goog" + + "le.com/go/iam/apiv3/iampb;iampb\252\002\023Google" + + ".Cloud.Iam.V3\312\002\023Google\\Cloud\\Iam\\V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3_OperationMetadata_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v3_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OrganizationLocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OrganizationLocationName.java new file mode 100644 index 000000000000..a0cdbb6aa0e6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/OrganizationLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationLocationName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + + @Deprecated + protected OrganizationLocationName() { + organization = null; + location = null; + } + + private OrganizationLocationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationLocationName of(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); + } + + public static String format(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); + } + + public static OrganizationLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION.validatedMatch( + formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + OrganizationLocationName that = ((OrganizationLocationName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/locations/{location}. */ + public static class Builder { + private String organization; + private String location; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(OrganizationLocationName organizationLocationName) { + this.organization = organizationLocationName.organization; + this.location = organizationLocationName.location; + } + + public OrganizationLocationName build() { + return new OrganizationLocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBinding.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBinding.java new file mode 100644 index 000000000000..b74105548eae --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBinding.java @@ -0,0 +1,5005 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * IAM policy binding resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3.PolicyBinding} + */ +@com.google.protobuf.Generated +public final class PolicyBinding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.PolicyBinding) + PolicyBindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBinding"); + } + + // Use PolicyBinding.newBuilder() to construct. + private PolicyBinding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyBinding() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PolicyBinding.class, com.google.iam.v3.PolicyBinding.Builder.class); + } + + /** + * + * + *
+   * Different policy kinds supported in this binding.
+   * 
+ * + * Protobuf enum {@code google.iam.v3.PolicyBinding.PolicyKind} + */ + public enum PolicyKind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + POLICY_KIND_UNSPECIFIED(0), + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + PRINCIPAL_ACCESS_BOUNDARY(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyKind"); + } + + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + public static final int POLICY_KIND_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + public static final int PRINCIPAL_ACCESS_BOUNDARY_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PolicyKind forNumber(int value) { + switch (value) { + case 0: + return POLICY_KIND_UNSPECIFIED; + case 1: + return PRINCIPAL_ACCESS_BOUNDARY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PolicyKind findValueByNumber(int number) { + return PolicyKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3.PolicyBinding.getDescriptor().getEnumTypes().get(0); + } + + private static final PolicyKind[] VALUES = values(); + + public static PolicyKind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PolicyKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3.PolicyBinding.PolicyKind) + } + + public interface TargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.PolicyBinding.Target) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + boolean hasPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + java.lang.String getPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + com.google.protobuf.ByteString getPrincipalSetBytes(); + + com.google.iam.v3.PolicyBinding.Target.TargetCase getTargetCase(); + } + + /** + * + * + *
+   * Target is the full resource name of the resource to which the policy will
+   * be bound. Immutable once set.
+   * 
+ * + * Protobuf type {@code google.iam.v3.PolicyBinding.Target} + */ + public static final class Target extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.PolicyBinding.Target) + TargetOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Target"); + } + + // Use Target.newBuilder() to construct. + private Target(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Target() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PolicyBinding.Target.class, + com.google.iam.v3.PolicyBinding.Target.Builder.class); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRINCIPAL_SET(1), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 1: + return PRINCIPAL_SET; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int PRINCIPAL_SET_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (targetCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.PolicyBinding.Target)) { + return super.equals(obj); + } + com.google.iam.v3.PolicyBinding.Target other = (com.google.iam.v3.PolicyBinding.Target) obj; + + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 1: + if (!getPrincipalSet().equals(other.getPrincipalSet())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (targetCase_) { + case 1: + hash = (37 * hash) + PRINCIPAL_SET_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalSet().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding.Target parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding.Target parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding.Target parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.PolicyBinding.Target prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Target is the full resource name of the resource to which the policy will
+     * be bound. Immutable once set.
+     * 
+ * + * Protobuf type {@code google.iam.v3.PolicyBinding.Target} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.PolicyBinding.Target) + com.google.iam.v3.PolicyBinding.TargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PolicyBinding.Target.class, + com.google.iam.v3.PolicyBinding.Target.Builder.class); + } + + // Construct using com.google.iam.v3.PolicyBinding.Target.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding.Target getDefaultInstanceForType() { + return com.google.iam.v3.PolicyBinding.Target.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding.Target build() { + com.google.iam.v3.PolicyBinding.Target result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding.Target buildPartial() { + com.google.iam.v3.PolicyBinding.Target result = + new com.google.iam.v3.PolicyBinding.Target(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.PolicyBinding.Target result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.iam.v3.PolicyBinding.Target result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.PolicyBinding.Target) { + return mergeFrom((com.google.iam.v3.PolicyBinding.Target) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.PolicyBinding.Target other) { + if (other == com.google.iam.v3.PolicyBinding.Target.getDefaultInstance()) return this; + switch (other.getTargetCase()) { + case PRINCIPAL_SET: + { + targetCase_ = 1; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 1; + target_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + @java.lang.Override + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + @java.lang.Override + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalSet() { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.PolicyBinding.Target) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.PolicyBinding.Target) + private static final com.google.iam.v3.PolicyBinding.Target DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.PolicyBinding.Target(); + } + + public static com.google.iam.v3.PolicyBinding.Target getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Target parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding.Target getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TARGET_FIELD_NUMBER = 6; + private com.google.iam.v3.PolicyBinding.Target target_; + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding.Target getTarget() { + return target_ == null ? com.google.iam.v3.PolicyBinding.Target.getDefaultInstance() : target_; + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + return target_ == null ? com.google.iam.v3.PolicyBinding.Target.getDefaultInstance() : target_; + } + + public static final int POLICY_KIND_FIELD_NUMBER = 11; + private int policyKind_ = 0; + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3.PolicyBinding.PolicyKind result = + com.google.iam.v3.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + public static final int POLICY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object policy_ = ""; + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_UID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyUid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + @java.lang.Override + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyUid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 8; + private com.google.type.Expr condition_; + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyUid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, policyUid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyUid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, policyUid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.PolicyBinding)) { + return super.equals(obj); + } + com.google.iam.v3.PolicyBinding other = (com.google.iam.v3.PolicyBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (policyKind_ != other.policyKind_) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (!getPolicyUid().equals(other.getPolicyUid())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + POLICY_KIND_FIELD_NUMBER; + hash = (53 * hash) + policyKind_; + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + POLICY_UID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyUid().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.PolicyBinding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.PolicyBinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * IAM policy binding resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3.PolicyBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.PolicyBinding) + com.google.iam.v3.PolicyBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PolicyBinding.class, com.google.iam.v3.PolicyBinding.Builder.class); + } + + // Construct using com.google.iam.v3.PolicyBinding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTargetFieldBuilder(); + internalGetConditionFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingResourcesProto + .internal_static_google_iam_v3_PolicyBinding_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding getDefaultInstanceForType() { + return com.google.iam.v3.PolicyBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding build() { + com.google.iam.v3.PolicyBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding buildPartial() { + com.google.iam.v3.PolicyBinding result = new com.google.iam.v3.PolicyBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.PolicyBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.target_ = targetBuilder_ == null ? target_ : targetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.policyKind_ = policyKind_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.policy_ = policy_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.policyUid_ = policyUid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.PolicyBinding) { + return mergeFrom((com.google.iam.v3.PolicyBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.PolicyBinding other) { + if (other == com.google.iam.v3.PolicyBinding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.policyKind_ != 0) { + setPolicyKindValue(other.getPolicyKindValue()); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getPolicyUid().isEmpty()) { + policyUid_ = other.policyUid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetTargetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 82 + case 88: + { + policyKind_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 88 + case 98: + { + policyUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.iam.v3.PolicyBinding.Target target_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding.Target, + com.google.iam.v3.PolicyBinding.Target.Builder, + com.google.iam.v3.PolicyBinding.TargetOrBuilder> + targetBuilder_; + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.iam.v3.PolicyBinding.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.iam.v3.PolicyBinding.Target.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + } else { + targetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3.PolicyBinding.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.iam.v3.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && target_ != null + && target_ != com.google.iam.v3.PolicyBinding.Target.getDefaultInstance()) { + getTargetBuilder().mergeFrom(value); + } else { + target_ = value; + } + } else { + targetBuilder_.mergeFrom(value); + } + if (target_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000020); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBinding.Target.Builder getTargetBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetTargetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.iam.v3.PolicyBinding.Target.getDefaultInstance() + : target_; + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding.Target, + com.google.iam.v3.PolicyBinding.Target.Builder, + com.google.iam.v3.PolicyBinding.TargetOrBuilder> + internalGetTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding.Target, + com.google.iam.v3.PolicyBinding.Target.Builder, + com.google.iam.v3.PolicyBinding.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private int policyKind_ = 0; + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKindValue(int value) { + policyKind_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3.PolicyBinding.PolicyKind result = + com.google.iam.v3.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKind(com.google.iam.v3.PolicyBinding.PolicyKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + policyKind_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicyKind() { + bitField0_ = (bitField0_ & ~0x00000040); + policyKind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + policy_ = getDefaultInstance().getPolicy(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object policyUid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyUid() { + policyUid_ = getDefaultInstance().getPolicyUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + conditionBuilder_; + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && condition_ != null + && condition_ != com.google.type.Expr.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + if (condition_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000200); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.PolicyBinding) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.PolicyBinding) + private static final com.google.iam.v3.PolicyBinding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.PolicyBinding(); + } + + public static com.google.iam.v3.PolicyBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyBinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.PolicyBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingName.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingName.java new file mode 100644 index 000000000000..6bd5c89a0b30 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingName.java @@ -0,0 +1,449 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PolicyBindingName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate FOLDER_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate PROJECT_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/policyBindings/{policy_binding}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String location; + private final String policyBinding; + private final String folder; + private final String project; + + @Deprecated + protected PolicyBindingName() { + organization = null; + location = null; + policyBinding = null; + folder = null; + project = null; + } + + private PolicyBindingName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(FolderLocationPolicyBindingBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + project = null; + pathTemplate = FOLDER_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(ProjectLocationPolicyBindingBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + folder = null; + pathTemplate = PROJECT_LOCATION_POLICY_BINDING; + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newOrganizationLocationPolicyBindingBuilder() { + return new Builder(); + } + + public static FolderLocationPolicyBindingBuilder newFolderLocationPolicyBindingBuilder() { + return new FolderLocationPolicyBindingBuilder(); + } + + public static ProjectLocationPolicyBindingBuilder newProjectLocationPolicyBindingBuilder() { + return new ProjectLocationPolicyBindingBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyBindingName of(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static String format(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static PolicyBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_POLICY_BINDING.match(formattedString); + return ofOrganizationLocationPolicyBindingName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (FOLDER_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION_POLICY_BINDING.match(formattedString); + return ofFolderLocationPolicyBindingName( + matchMap.get("folder"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (PROJECT_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_POLICY_BINDING.match(formattedString); + return ofProjectLocationPolicyBindingName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("policy_binding")); + } + throw new ValidationException("PolicyBindingName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PolicyBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString) + || FOLDER_LOCATION_POLICY_BINDING.matches(formattedString) + || PROJECT_LOCATION_POLICY_BINDING.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (policyBinding != null) { + fieldMapBuilder.put("policy_binding", policyBinding); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PolicyBindingName that = ((PolicyBindingName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.policyBinding, that.policyBinding) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(policyBinding); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** + * Builder for organizations/{organization}/locations/{location}/policyBindings/{policy_binding}. + */ + public static class Builder { + private String organization; + private String location; + private String policyBinding; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + private Builder(PolicyBindingName policyBindingName) { + Preconditions.checkArgument( + Objects.equals(policyBindingName.pathTemplate, ORGANIZATION_LOCATION_POLICY_BINDING), + "toBuilder is only supported when PolicyBindingName has the pattern of" + + " organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + this.organization = policyBindingName.organization; + this.location = policyBindingName.location; + this.policyBinding = policyBindingName.policyBinding; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/policyBindings/{policy_binding}. */ + public static class FolderLocationPolicyBindingBuilder { + private String folder; + private String location; + private String policyBinding; + + protected FolderLocationPolicyBindingBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public FolderLocationPolicyBindingBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/policyBindings/{policy_binding}. */ + public static class ProjectLocationPolicyBindingBuilder { + private String project; + private String location; + private String policyBinding; + + protected ProjectLocationPolicyBindingBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public ProjectLocationPolicyBindingBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingOrBuilder.java new file mode 100644 index 000000000000..46b6ce9d5083 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingOrBuilder.java @@ -0,0 +1,604 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface PolicyBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.PolicyBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.iam.v3.PolicyBinding.Target getTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PolicyBinding.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + int getPolicyKindValue(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + com.google.iam.v3.PolicyBinding.PolicyKind getPolicyKind(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + java.lang.String getPolicy(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + java.lang.String getPolicyUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + com.google.protobuf.ByteString getPolicyUidBytes(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + com.google.type.Expr getCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingResourcesProto.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingResourcesProto.java new file mode 100644 index 000000000000..f49c7b5d1e6f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingResourcesProto.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public final class PolicyBindingResourcesProto extends com.google.protobuf.GeneratedFile { + private PolicyBindingResourcesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBindingResourcesProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PolicyBinding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PolicyBinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PolicyBinding_Target_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PolicyBinding_Target_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + ",google/iam/v3/policy_binding_resources.proto\022\r" + + "google.iam.v3\032\037google/api/field_behavior.proto\032\033google/api/field_info.pr" + + "oto\032\031google/api/resource.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\026google/type/expr.proto\"\326\007\n\r" + + "PolicyBinding\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022G\n" + + "\013annotations\030\005" + + " \003(\0132-.google.iam.v3.PolicyBinding.AnnotationsEntryB\003\340A\001\022;\n" + + "\006target\030\006" + + " \001(\0132#.google.iam.v3.PolicyBinding.TargetB\006\340A\005\340A\002\022A\n" + + "\013policy_kind\030\013" + + " \001(\0162\'.google.iam.v3.PolicyBinding.PolicyKindB\003\340A\005\022\026\n" + + "\006policy\030\007 \001(\tB\006\340A\005\340A\002\022\027\n\n" + + "policy_uid\030\014 \001(\tB\003\340A\003\022)\n" + + "\tcondition\030\010 \001(\0132\021.google.type.ExprB\003\340A\001\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0320\n" + + "\006Target\022\034\n\r" + + "principal_set\030\001 \001(\tB\003\340A\005H\000B\010\n" + + "\006target\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"H\n\n" + + "PolicyKind\022\033\n" + + "\027POLICY_KIND_UNSPECIFIED\020\000\022\035\n" + + "\031PRINCIPAL_ACCESS_BOUNDARY\020\001:\250\002\352A\244\002\n" + + " iam.googleapis.com/PolicyBinding\022Qorganizations/{organizat" + + "ion}/locations/{location}/policyBindings/{policy_binding}\022Efolders/{folder}/loca" + + "tions/{location}/policyBindings/{policy_binding}\022Gprojects/{project}/locations/{" + + "location}/policyBindings/{policy_binding}*\016policyBindings2\r" + + "policyBindingB\211\001\n" + + "\021com.google.iam.v3B\033PolicyBindingResourcesPr" + + "otoP\001Z)cloud.google.com/go/iam/apiv3/iam" + + "pb;iampb\252\002\023Google.Cloud.Iam.V3\312\002\023Google\\Cloud\\Iam\\V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v3_PolicyBinding_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v3_PolicyBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PolicyBinding_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "Target", + "PolicyKind", + "Policy", + "PolicyUid", + "Condition", + "CreateTime", + "UpdateTime", + }); + internal_static_google_iam_v3_PolicyBinding_Target_descriptor = + internal_static_google_iam_v3_PolicyBinding_descriptor.getNestedType(0); + internal_static_google_iam_v3_PolicyBinding_Target_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PolicyBinding_Target_descriptor, + new java.lang.String[] { + "PrincipalSet", "Target", + }); + internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_descriptor = + internal_static_google_iam_v3_PolicyBinding_descriptor.getNestedType(1); + internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PolicyBinding_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.ExprProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsServiceProto.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsServiceProto.java new file mode 100644 index 000000000000..49f48baf81f6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PolicyBindingsServiceProto.java @@ -0,0 +1,283 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public final class PolicyBindingsServiceProto extends com.google.protobuf.GeneratedFile { + private PolicyBindingsServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBindingsServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_CreatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_GetPolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_UpdatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_DeletePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_ListPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_ListPolicyBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "+google/iam/v3/policy_bindings_service.proto\022\r" + + "google.iam.v3\032\034google/api/annotat" + + "ions.proto\032\027google/api/client.proto\032\037goo" + + "gle/api/field_behavior.proto\032\031google/api" + + "/resource.proto\032&google/iam/v3/operation_metadata.proto\032,google/iam/v3/policy_bi" + + "nding_resources.proto\032#google/longrunnin" + + "g/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\"\315\001\n" + + "\032CreatePolicyBindingRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\036\n" + + "\021policy_binding_id\030\002 \001(\tB\003\340A\002\0229\n" + + "\016policy_binding\030\003" + + " \001(\0132\034.google.iam.v3.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"Q\n" + + "\027GetPolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\"\251\001\n" + + "\032UpdatePolicyBindingRequest\0229\n" + + "\016policy_binding\030\001" + + " \001(\0132\034.google.iam.v3.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\0224\n" + + "\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\203\001\n" + + "\032DeletePolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\"\233\001\n" + + "\031ListPolicyBindingsRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"q\n" + + "\032ListPolicyBindingsResponse\0225\n" + + "\017policy_bindings\030\001 \003(\0132\034.google.iam.v3.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\243\001\n" + + "!SearchTargetPolicyBindingsRequest\022\023\n" + + "\006target\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\0228\n" + + "\006parent\030\005 \001(\tB(\340A\002\372A\"\022 iam.googleapis.com/PolicyBinding\"y\n" + + "\"SearchTargetPolicyBindingsResponse\0225\n" + + "\017policy_bindings\030\001 \003(\0132\034.google.iam.v3.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\0012\240\021\n" + + "\016PolicyBindings\022\214\003\n" + + "\023CreatePolicyBinding\022).google.iam.v3.CreatePolicyBindingR" + + "equest\032\035.google.longrunning.Operation\"\252\002\312A\"\n\r" + + "PolicyBinding\022\021OperationMetadata\332A\'" + + "parent,policy_binding,policy_binding_id\202" + + "\323\344\223\002\324\001\"2/v3/{parent=projects/*/locations" + + "/*}/policyBindings:\016policy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyB" + + "indings:\016policy_bindingZI\"7/v3/{parent=o" + + "rganizations/*/locations/*}/policyBindings:\016policy_binding\022\215\002\n" + + "\020GetPolicyBinding\022&.google.iam.v3.GetPolicyBindingRequest\032" + + "\034.google.iam.v3.PolicyBinding\"\262\001\332A\004name\202" + + "\323\344\223\002\244\001\0222/v3/{name=projects/*/locations/*" + + "/policyBindings/*}Z3\0221/v3/{name=folders/*/locations/*/policyBindings/*}Z9\0227/v3/{" + + "name=organizations/*/locations/*/policyBindings/*}\022\254\003\n" + + "\023UpdatePolicyBinding\022).goo" + + "gle.iam.v3.UpdatePolicyBindingRequest\032\035.google.longrunning.Operation\"\312\002\312A\"\n\r" + + "PolicyBinding\022\021OperationMetadata\332A\032policy_bi" + + "nding,update_mask\202\323\344\223\002\201\0022A/v3/{policy_bi" + + "nding.name=projects/*/locations/*/policyBindings/*}:\016policy_bindingZR2@/v3/{poli" + + "cy_binding.name=folders/*/locations/*/policyBindings/*}:\016policy_bindingZX2F/v3/{" + + "policy_binding.name=organizations/*/loca" + + "tions/*/policyBindings/*}:\016policy_binding\022\301\002\n" + + "\023DeletePolicyBinding\022).google.iam.v" + + "3.DeletePolicyBindingRequest\032\035.google.longrunning.Operation\"\337\001\312A*\n" + + "\025google.protob" + + "uf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002\244" + + "\001*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/loc" + + "ations/*/policyBindings/*}Z9*7/v3/{name=" + + "organizations/*/locations/*/policyBindings/*}\022\240\002\n" + + "\022ListPolicyBindings\022(.google.iam.v3.ListPolicyBindingsRequest\032).google." + + "iam.v3.ListPolicyBindingsResponse\"\264\001\332A\006p" + + "arent\202\323\344\223\002\244\001\0222/v3/{parent=projects/*/loc" + + "ations/*}/policyBindingsZ3\0221/v3/{parent=folders/*/locations/*}/policyBindingsZ9\022" + + "7/v3/{parent=organizations/*/locations/*}/policyBindings\022\220\003\n" + + "\032SearchTargetPolicyBindings\0220.google.iam.v3.SearchTargetPoli" + + "cyBindingsRequest\0321.google.iam.v3.SearchTargetPolicyBindingsResponse\"\214\002\332A\r" + + "parent,target\202\323\344\223\002\365\001\022M/v3/{parent=projects/*/l" + + "ocations/*}/policyBindings:searchTargetPolicyBindingsZN\022L/v3/{parent=folders/*/l" + + "ocations/*}/policyBindings:searchTargetPolicyBindingsZT\022R/v3/{parent=organizatio" + + "ns/*/locations/*}/policyBindings:searchT" + + "argetPolicyBindings\032F\312A\022iam.googleapis.c" + + "om\322A.https://www.googleapis.com/auth/cloud-platformB\264\002\n" + + "\021com.google.iam.v3B\032PolicyBindingsServiceProtoP\001Z)cloud.google.co" + + "m/go/iam/apiv3/iampb;iampb\252\002\023Google.Cloud.Iam.V3\312\002\023Google\\Cloud\\Iam\\V3\352A\\\n" + + "\'iam.googleapis.com/OrganizationLocation\0221orga" + + "nizations/{organization}/locations/{location}\352AJ\n" + + "!iam.googleapis.com/FolderLocation\022%folders/{folder}/locations/{locatio" + + "n}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3.OperationMetadataProto.getDescriptor(), + com.google.iam.v3.PolicyBindingResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3_CreatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_CreatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "PolicyBindingId", "PolicyBinding", "ValidateOnly", + }); + internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3_GetPolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_GetPolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3_UpdatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "PolicyBinding", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v3_DeletePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_DeletePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", + }); + internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_iam_v3_ListPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_ListPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v3_ListPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_ListPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Target", "PageSize", "PageToken", "Parent", + }); + internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3.OperationMetadataProto.getDescriptor(); + com.google.iam.v3.PolicyBindingResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesServiceProto.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesServiceProto.java new file mode 100644 index 000000000000..638211a9db42 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPoliciesServiceProto.java @@ -0,0 +1,280 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPoliciesServiceProto + extends com.google.protobuf.GeneratedFile { + private PrincipalAccessBoundaryPoliciesServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPoliciesServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + ">google/iam/v3/principal_access_boundary_policies_service.proto\022\r" + + "google.iam.v3\032\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032&goog" + + "le/iam/v3/operation_metadata.proto\032,google/iam/v3/policy_binding_resources.proto" + + "\032>google/iam/v3/principal_access_boundary_policy_resources.proto\032#google/longrun" + + "ning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\"\241\002\n" + + "*CreatePrincipalAccessBoundaryPolicyRequest\022H\n" + + "\006parent\030\001 \001(\tB8\340A\002\372A2\0220iam" + + ".googleapis.com/PrincipalAccessBoundaryPolicy\0220\n" + + "#principal_access_boundary_policy_id\030\002 \001(\tB\003\340A\002\022[\n" + + " principal_access_boundary_policy\030\003" + + " \001(\0132,.google.iam.v3.PrincipalAccessBoundaryPolicyB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"q\n" + + "\'GetPrincipalAccessBoundaryPolicyRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\333\001\n" + + "*UpdatePrincipalAccessBoundaryPolicyRequest\022[\n" + + " principal_access_boundary_policy\030\001" + + " \001(\0132,.google.iam.v3.PrincipalAccessBoundaryPolicyB\003\340A\002\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\0224\n" + + "\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\267\001\n" + + "*DeletePrincipalAccessBoundaryPolicyRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPolicy\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\022\022\n" + + "\005force\030\004 \001(\010B\003\340A\001\"\247\001\n" + + "*ListPrincipalAccessBoundaryPoliciesRequest\022H\n" + + "\006parent\030\001 \001(" + + "\tB8\340A\002\372A2\0220iam.googleapis.com/PrincipalAccessBoundaryPolicy\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\245\001\n" + + "+ListPrincipalAccessBoundaryPoliciesResponse\022X\n" + + "\"principal_access_boundary_policies\030\001 \003(" + + "\0132,.google.iam.v3.PrincipalAccessBoundaryPolicy\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\255\001\n" + + "2SearchPrincipalAccessBoundaryPolicyBindingsRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPolicy\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\"\212\001\n" + + "3SearchPrincipalAccessBoundaryPolicyBindingsResponse\0225\n" + + "\017policy_bindings\030\001 \003(\0132\034.google.iam.v3.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\0012\354\016\n" + + "\037PrincipalAccessBoundaryPolicies\022\367\002\n" + + "#CreatePrincipalAccessBoundaryPolicy\0229.google." + + "iam.v3.CreatePrincipalAccessBoundaryPoli" + + "cyRequest\032\035.google.longrunning.Operation\"\365\001\312A2\n" + + "\035PrincipalAccessBoundaryPolicy\022\021OperationMetadata\332AKparent,principal_acce" + + "ss_boundary_policy,principal_access_boun" + + "dary_policy_id\202\323\344\223\002l\"H/v3/{parent=organi" + + "zations/*/locations/*}/principalAccessBoundaryPolicies:" + + " principal_access_boundary_policy\022\341\001\n" + + " GetPrincipalAccessBoundaryPolicy\0226.google.iam.v3.GetPrincipalAccess" + + "BoundaryPolicyRequest\032,.google.iam.v3.Pr" + + "incipalAccessBoundaryPolicy\"W\332A\004name\202\323\344\223" + + "\002J\022H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\022\372\002\n" + + "#UpdatePrincipalAccessBoundaryPolicy\0229.google.iam.v3.UpdatePrincipalAccessBounda" + + "ryPolicyRequest\032\035.google.longrunning.Operation\"\370\001\312A2\n" + + "\035PrincipalAccessBoundaryPolicy\022\021OperationMetadata\332A,principal_acces" + + "s_boundary_policy,update_mask\202\323\344\223\002\215\0012i/v" + + "3/{principal_access_boundary_policy.name" + + "=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:" + + " principal_access_boundary_policy\022\206\002\n" + + "#DeletePrincipalAccessBoundaryPolicy\0229.google.iam.v3.Delete" + + "PrincipalAccessBoundaryPolicyRequest\032\035.google.longrunning.Operation\"\204\001\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004na" + + "me\202\323\344\223\002J*H/v3/{name=organizations/*/loca" + + "tions/*/principalAccessBoundaryPolicies/*}\022\367\001\n" + + "#ListPrincipalAccessBoundaryPolicies\0229.google.iam.v3.ListPrincipalAccessBo" + + "undaryPoliciesRequest\032:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRespons" + + "e\"Y\332A\006parent\202\323\344\223\002J\022H/v3/{parent=organiza" + + "tions/*/locations/*}/principalAccessBoundaryPolicies\022\242\002\n" + + "+SearchPrincipalAccessBoundaryPolicyBindings\022A.google.iam.v3.Sea" + + "rchPrincipalAccessBoundaryPolicyBindingsRequest\032B.google.iam.v3.SearchPrincipalA" + + "ccessBoundaryPolicyBindingsResponse\"l\332A\004" + + "name\202\323\344\223\002_\022]/v3/{name=organizations/*/lo" + + "cations/*/principalAccessBoundaryPolicie" + + "s/*}:searchPolicyBindings\032F\312A\022iam.google" + + "apis.com\322A.https://www.googleapis.com/auth/cloud-platformB\231\001\n" + + "\021com.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceP" + + "rotoP\001Z)cloud.google.com/go/iam/apiv3/ia" + + "mpb;iampb\252\002\023Google.Cloud.Iam.V3\312\002\023Google\\Cloud\\Iam\\V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3.OperationMetadataProto.getDescriptor(), + com.google.iam.v3.PolicyBindingResourcesProto.getDescriptor(), + com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_CreatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", + "PrincipalAccessBoundaryPolicyId", + "PrincipalAccessBoundaryPolicy", + "ValidateOnly", + }); + internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_GetPrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicy", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_DeletePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", "Force", + }); + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_ListPrincipalAccessBoundaryPoliciesResponse_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicies", "NextPageToken", + }); + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Name", "PageSize", "PageToken", + }); + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3.OperationMetadataProto.getDescriptor(); + com.google.iam.v3.PolicyBindingResourcesProto.getDescriptor(); + com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicy.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..5a3d81ad311d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicy.java @@ -0,0 +1,2542 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * An IAM principal access boundary policy resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicy} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.PrincipalAccessBoundaryPolicy) + PrincipalAccessBoundaryPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicy"); + } + + // Use PrincipalAccessBoundaryPolicy.newBuilder() to construct. + private PrincipalAccessBoundaryPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicy() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DETAILS_FIELD_NUMBER = 8; + private com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails details_; + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDetails() { + return details_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder() { + return details_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDetails()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicy)) { + return super.equals(obj); + } + com.google.iam.v3.PrincipalAccessBoundaryPolicy other = + (com.google.iam.v3.PrincipalAccessBoundaryPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.PrincipalAccessBoundaryPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An IAM principal access boundary policy resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.PrincipalAccessBoundaryPolicy) + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder.class); + } + + // Construct using com.google.iam.v3.PrincipalAccessBoundaryPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy build() { + com.google.iam.v3.PrincipalAccessBoundaryPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy buildPartial() { + com.google.iam.v3.PrincipalAccessBoundaryPolicy result = + new com.google.iam.v3.PrincipalAccessBoundaryPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.PrincipalAccessBoundaryPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.details_ = detailsBuilder_ == null ? details_ : detailsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicy) { + return mergeFrom((com.google.iam.v3.PrincipalAccessBoundaryPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.PrincipalAccessBoundaryPolicy other) { + if (other == com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(internalGetDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails details_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + detailsBuilder_; + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDetails() { + if (detailsBuilder_ == null) { + return details_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails(com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + } else { + detailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails( + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDetails(com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && details_ != null + && details_ + != com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance()) { + getDetailsBuilder().mergeFrom(value); + } else { + details_ = value; + } + } else { + detailsBuilder_.mergeFrom(value); + } + if (details_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000080); + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder getDetailsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDetailsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + internalGetDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder>( + getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.PrincipalAccessBoundaryPolicy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.PrincipalAccessBoundaryPolicy) + private static final com.google.iam.v3.PrincipalAccessBoundaryPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.PrincipalAccessBoundaryPolicy(); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetails.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetails.java new file mode 100644 index 000000000000..4ddf2a95bc55 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetails.java @@ -0,0 +1,1215 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Principal access boundary policy details
+ * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicyDetails} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyDetails extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.PrincipalAccessBoundaryPolicyDetails) + PrincipalAccessBoundaryPolicyDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyDetails"); + } + + // Use PrincipalAccessBoundaryPolicyDetails.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyDetails( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyDetails() { + rules_ = java.util.Collections.emptyList(); + enforcementVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getRules(int index) { + return rules_.get(index); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int ENFORCEMENT_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + @java.lang.Override + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enforcementVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enforcementVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, enforcementVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enforcementVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, enforcementVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails)) { + return super.equals(obj); + } + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails other = + (com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails) obj; + + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getEnforcementVersion().equals(other.getEnforcementVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + ENFORCEMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getEnforcementVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Principal access boundary policy details
+   * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicyDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.PrincipalAccessBoundaryPolicyDetails) + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + // Construct using com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + enforcementVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails build() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails buildPartial() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails result = + new com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enforcementVersion_ = enforcementVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails) { + return mergeFrom((com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails other) { + if (other == com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance()) + return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getEnforcementVersion().isEmpty()) { + enforcementVersion_ = other.enforcementVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule m = + input.readMessage( + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.parser(), + extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + case 34: + { + enforcementVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = + new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules(int index, com.google.iam.v3.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(int index, com.google.iam.v3.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder getRulesBuilder(int index) { + return internalGetRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder() { + return internalGetRulesFieldBuilder() + .addBuilder(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder(int index) { + return internalGetRulesFieldBuilder() + .addBuilder( + index, com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRulesBuilderList() { + return internalGetRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder> + internalGetRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enforcementVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnforcementVersion() { + enforcementVersion_ = getDefaultInstance().getEnforcementVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.PrincipalAccessBoundaryPolicyDetails) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.PrincipalAccessBoundaryPolicyDetails) + private static final com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails(); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java new file mode 100644 index 000000000000..0d4764715e0a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.PrincipalAccessBoundaryPolicyDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRulesList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getRules(int index); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRulesCount(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRulesOrBuilderList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + java.lang.String getEnforcementVersion(); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + com.google.protobuf.ByteString getEnforcementVersionBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyName.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyName.java new file mode 100644 index 000000000000..ef07cb8b17ec --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyName.java @@ -0,0 +1,243 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPolicyName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + private final String principalAccessBoundaryPolicy; + + @Deprecated + protected PrincipalAccessBoundaryPolicyName() { + organization = null; + location = null; + principalAccessBoundaryPolicy = null; + } + + private PrincipalAccessBoundaryPolicyName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + principalAccessBoundaryPolicy = + Preconditions.checkNotNull(builder.getPrincipalAccessBoundaryPolicy()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PrincipalAccessBoundaryPolicyName of( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build(); + } + + public static String format( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build() + .toString(); + } + + public static PrincipalAccessBoundaryPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.validatedMatch( + formattedString, + "PrincipalAccessBoundaryPolicyName.parse: formattedString not in valid format"); + return of( + matchMap.get("organization"), + matchMap.get("location"), + matchMap.get("principal_access_boundary_policy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PrincipalAccessBoundaryPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (principalAccessBoundaryPolicy != null) { + fieldMapBuilder.put("principal_access_boundary_policy", principalAccessBoundaryPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.instantiate( + "organization", + organization, + "location", + location, + "principal_access_boundary_policy", + principalAccessBoundaryPolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PrincipalAccessBoundaryPolicyName that = ((PrincipalAccessBoundaryPolicyName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.principalAccessBoundaryPolicy, that.principalAccessBoundaryPolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(principalAccessBoundaryPolicy); + return h; + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}. + */ + public static class Builder { + private String organization; + private String location; + private String principalAccessBoundaryPolicy; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPrincipalAccessBoundaryPolicy(String principalAccessBoundaryPolicy) { + this.principalAccessBoundaryPolicy = principalAccessBoundaryPolicy; + return this; + } + + private Builder(PrincipalAccessBoundaryPolicyName principalAccessBoundaryPolicyName) { + this.organization = principalAccessBoundaryPolicyName.organization; + this.location = principalAccessBoundaryPolicyName.location; + this.principalAccessBoundaryPolicy = + principalAccessBoundaryPolicyName.principalAccessBoundaryPolicy; + } + + public PrincipalAccessBoundaryPolicyName build() { + return new PrincipalAccessBoundaryPolicyName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyOrBuilder.java new file mode 100644 index 000000000000..17d30a05cac5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyOrBuilder.java @@ -0,0 +1,355 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.PrincipalAccessBoundaryPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + boolean hasDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetails getDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyResourcesProto.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyResourcesProto.java new file mode 100644 index 000000000000..df8f2b772381 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyResourcesProto.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyResourcesProto + extends com.google.protobuf.GeneratedFile { + private PrincipalAccessBoundaryPolicyResourcesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyResourcesProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + ">google/iam/v3/principal_access_boundary_policy_resources.proto\022\r" + + "google.iam.v3\032\037google/api/field_behavior.proto\032\033google" + + "/api/field_info.proto\032\031google/api/resour" + + "ce.proto\032\037google/protobuf/timestamp.proto\"\255\005\n" + + "\035PrincipalAccessBoundaryPolicy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022W\n" + + "\013annotations\030\005 \003(\0132=.google.iam" + + ".v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\003\340A\001\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022I\n" + + "\007details\030\010 \001(\01323.google.iam.v3.Pri" + + "ncipalAccessBoundaryPolicyDetailsB\003\340A\001\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\354\001\352A\350\001\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPolicy\022torganizatio" + + "ns/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principa" + + "l_access_boundary_policy}*\037principalAcce" + + "ssBoundaryPolicies2\035principalAccessBoundaryPolicy\"\216\001\n" + + "$PrincipalAccessBoundaryPolicyDetails\022D\n" + + "\005rules\030\001 \003(\01320.google.iam.v" + + "3.PrincipalAccessBoundaryPolicyRuleB\003\340A\002\022 \n" + + "\023enforcement_version\030\004 \001(\tB\003\340A\001\"\320\001\n" + + "!PrincipalAccessBoundaryPolicyRule\022\030\n" + + "\013description\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tresources\030\002 \003(\tB\003\340A\002\022L\n" + + "\006effect\030\003 \001(\01627.google.iam.v3.Princ" + + "ipalAccessBoundaryPolicyRule.EffectB\003\340A\002\"+\n" + + "\006Effect\022\026\n" + + "\022EFFECT_UNSPECIFIED\020\000\022\t\n" + + "\005ALLOW\020\001B\231\001\n" + + "\021com.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\001Z)clou" + + "d.google.com/go/iam/apiv3/iampb;iampb\252\002\023" + + "Google.Cloud.Iam.V3\312\002\023Google\\Cloud\\Iam\\V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "CreateTime", + "UpdateTime", + "Details", + }); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor = + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_descriptor.getNestedType(0); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyDetails_descriptor, + new java.lang.String[] { + "Rules", "EnforcementVersion", + }); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor, + new java.lang.String[] { + "Description", "Resources", "Effect", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRule.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRule.java new file mode 100644 index 000000000000..412234c419f4 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRule.java @@ -0,0 +1,1369 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Principal access boundary policy rule that defines the resource boundary.
+ * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicyRule} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.PrincipalAccessBoundaryPolicyRule) + PrincipalAccessBoundaryPolicyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyRule"); + } + + // Use PrincipalAccessBoundaryPolicyRule.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyRule( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyRule() { + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + /** + * + * + *
+   * An effect to describe the access relationship.
+   * 
+ * + * Protobuf enum {@code google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect} + */ + public enum Effect implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + EFFECT_UNSPECIFIED(0), + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + ALLOW(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Effect"); + } + + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + public static final int EFFECT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + public static final int ALLOW_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Effect valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Effect forNumber(int value) { + switch (value) { + case 0: + return EFFECT_UNSPECIFIED; + case 1: + return ALLOW; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Effect findValueByNumber(int number) { + return Effect.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Effect[] VALUES = values(); + + public static Effect valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Effect(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect) + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_; + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + public static final int EFFECT_FIELD_NUMBER = 3; + private int effect_ = 0; + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + for (int i = 0; i < resources_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resources_.getRaw(i)); + } + if (effect_ + != com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, effect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + { + int dataSize = 0; + for (int i = 0; i < resources_.size(); i++) { + dataSize += computeStringSizeNoTag(resources_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcesList().size(); + } + if (effect_ + != com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, effect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicyRule)) { + return super.equals(obj); + } + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule other = + (com.google.iam.v3.PrincipalAccessBoundaryPolicyRule) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (effect_ != other.effect_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + hash = (37 * hash) + EFFECT_FIELD_NUMBER; + hash = (53 * hash) + effect_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Principal access boundary policy rule that defines the resource boundary.
+   * 
+ * + * Protobuf type {@code google.iam.v3.PrincipalAccessBoundaryPolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.PrincipalAccessBoundaryPolicyRule) + com.google.iam.v3.PrincipalAccessBoundaryPolicyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + // Construct using com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule build() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule buildPartial() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule result = + new com.google.iam.v3.PrincipalAccessBoundaryPolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + resources_.makeImmutable(); + result.resources_ = resources_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.effect_ = effect_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.PrincipalAccessBoundaryPolicyRule) { + return mergeFrom((com.google.iam.v3.PrincipalAccessBoundaryPolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule other) { + if (other == com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ |= 0x00000002; + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + if (other.effect_ != 0) { + setEffectValue(other.getEffectValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcesIsMutable(); + resources_.add(s); + break; + } // case 18 + case 24: + { + effect_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourcesIsMutable() { + if (!resources_.isModifiable()) { + resources_ = new com.google.protobuf.LazyStringArrayList(resources_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + resources_.makeImmutable(); + return resources_; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The resources to set. + * @return This builder for chaining. + */ + public Builder setResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resources to add. + * @return This builder for chaining. + */ + public Builder addResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The resources to add. + * @return This builder for chaining. + */ + public Builder addAllResources(java.lang.Iterable values) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResources() { + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the resources to add. + * @return This builder for chaining. + */ + public Builder addResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int effect_ = 0; + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for effect to set. + * @return This builder for chaining. + */ + public Builder setEffectValue(int value) { + effect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The effect to set. + * @return This builder for chaining. + */ + public Builder setEffect(com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + effect_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffect() { + bitField0_ = (bitField0_ & ~0x00000004); + effect_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.PrincipalAccessBoundaryPolicyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.PrincipalAccessBoundaryPolicyRule) + private static final com.google.iam.v3.PrincipalAccessBoundaryPolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.PrincipalAccessBoundaryPolicyRule(); + } + + public static com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRuleOrBuilder.java new file mode 100644 index 000000000000..f58082e0dfa1 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/PrincipalAccessBoundaryPolicyRuleOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.PrincipalAccessBoundaryPolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + java.util.List getResourcesList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + int getResourcesCount(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + java.lang.String getResources(int index); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + com.google.protobuf.ByteString getResourcesBytes(int index); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + int getEffectValue(); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect getEffect(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java new file mode 100644 index 000000000000..680e643f7692 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java @@ -0,0 +1,988 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class SearchPrincipalAccessBoundaryPolicyBindingsRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchPrincipalAccessBoundaryPolicyBindingsRequest"); + } + + // Use SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsRequest() { + name_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest other = + (com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder.class); + } + + // Construct using + // com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest build() { + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest buildPartial() { + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = + new com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) { + return mergeFrom( + (com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest other) { + if (other + == com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + private static final com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest(); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..17c2334e227e --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java new file mode 100644 index 000000000000..0d5c6c3878b8 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java @@ -0,0 +1,1139 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class SearchPrincipalAccessBoundaryPolicyBindingsResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchPrincipalAccessBoundaryPolicyBindingsResponse"); + } + + // Use SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse other = + (com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder.class); + } + + // Construct using + // com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse build() { + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse buildPartial() { + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = + new com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + return mergeFrom( + (com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse other) { + if (other + == com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance()) return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3.PolicyBinding m = + input.readMessage(com.google.iam.v3.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + private static final com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse(); + } + + public static com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..d305023ad9f9 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequest.java new file mode 100644 index 000000000000..5f91619929e5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequest.java @@ -0,0 +1,1270 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.SearchTargetPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class SearchTargetPolicyBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.SearchTargetPolicyBindingsRequest) + SearchTargetPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchTargetPolicyBindingsRequest"); + } + + // Use SearchTargetPolicyBindingsRequest.newBuilder() to construct. + private SearchTargetPolicyBindingsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsRequest() { + target_ = ""; + pageToken_ = ""; + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3.SearchTargetPolicyBindingsRequest.Builder.class); + } + + public static final int TARGET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.SearchTargetPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3.SearchTargetPolicyBindingsRequest other = + (com.google.iam.v3.SearchTargetPolicyBindingsRequest) obj; + + if (!getTarget().equals(other.getTarget())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.SearchTargetPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.SearchTargetPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.SearchTargetPolicyBindingsRequest) + com.google.iam.v3.SearchTargetPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3.SearchTargetPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3.SearchTargetPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = ""; + pageSize_ = 0; + pageToken_ = ""; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3.SearchTargetPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsRequest build() { + com.google.iam.v3.SearchTargetPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsRequest buildPartial() { + com.google.iam.v3.SearchTargetPolicyBindingsRequest result = + new com.google.iam.v3.SearchTargetPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.SearchTargetPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.SearchTargetPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3.SearchTargetPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.SearchTargetPolicyBindingsRequest other) { + if (other == com.google.iam.v3.SearchTargetPolicyBindingsRequest.getDefaultInstance()) + return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.SearchTargetPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.SearchTargetPolicyBindingsRequest) + private static final com.google.iam.v3.SearchTargetPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.SearchTargetPolicyBindingsRequest(); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..41476438b177 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface SearchTargetPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.SearchTargetPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponse.java new file mode 100644 index 000000000000..0aa1c3c42d82 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponse.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Response message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.SearchTargetPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class SearchTargetPolicyBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.SearchTargetPolicyBindingsResponse) + SearchTargetPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchTargetPolicyBindingsResponse"); + } + + // Use SearchTargetPolicyBindingsResponse.newBuilder() to construct. + private SearchTargetPolicyBindingsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3.SearchTargetPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.SearchTargetPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3.SearchTargetPolicyBindingsResponse other = + (com.google.iam.v3.SearchTargetPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.SearchTargetPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.SearchTargetPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.SearchTargetPolicyBindingsResponse) + com.google.iam.v3.SearchTargetPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3.SearchTargetPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3.SearchTargetPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3.SearchTargetPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsResponse build() { + com.google.iam.v3.SearchTargetPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsResponse buildPartial() { + com.google.iam.v3.SearchTargetPolicyBindingsResponse result = + new com.google.iam.v3.SearchTargetPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3.SearchTargetPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3.SearchTargetPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.SearchTargetPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3.SearchTargetPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.SearchTargetPolicyBindingsResponse other) { + if (other == com.google.iam.v3.SearchTargetPolicyBindingsResponse.getDefaultInstance()) + return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3.PolicyBinding m = + input.readMessage(com.google.iam.v3.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.SearchTargetPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.SearchTargetPolicyBindingsResponse) + private static final com.google.iam.v3.SearchTargetPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.SearchTargetPolicyBindingsResponse(); + } + + public static com.google.iam.v3.SearchTargetPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..f8c9bb1783ba --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/SearchTargetPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface SearchTargetPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.SearchTargetPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequest.java new file mode 100644 index 000000000000..f7e5bb8164c3 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequest.java @@ -0,0 +1,1148 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for UpdatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.UpdatePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.UpdatePolicyBindingRequest) + UpdatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePolicyBindingRequest"); + } + + // Use UpdatePolicyBindingRequest.newBuilder() to construct. + private UpdatePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePolicyBindingRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.UpdatePolicyBindingRequest.class, + com.google.iam.v3.UpdatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int POLICY_BINDING_FIELD_NUMBER = 1; + private com.google.iam.v3.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.UpdatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3.UpdatePolicyBindingRequest other = + (com.google.iam.v3.UpdatePolicyBindingRequest) obj; + + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3.UpdatePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.UpdatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.UpdatePolicyBindingRequest) + com.google.iam.v3.UpdatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.UpdatePolicyBindingRequest.class, + com.google.iam.v3.UpdatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3.UpdatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyBindingFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PolicyBindingsServiceProto + .internal_static_google_iam_v3_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3.UpdatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.UpdatePolicyBindingRequest build() { + com.google.iam.v3.UpdatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePolicyBindingRequest buildPartial() { + com.google.iam.v3.UpdatePolicyBindingRequest result = + new com.google.iam.v3.UpdatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3.UpdatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.UpdatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3.UpdatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.UpdatePolicyBindingRequest other) { + if (other == com.google.iam.v3.UpdatePolicyBindingRequest.getDefaultInstance()) return this; + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000001); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder> + internalGetPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PolicyBinding, + com.google.iam.v3.PolicyBinding.Builder, + com.google.iam.v3.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.UpdatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.UpdatePolicyBindingRequest) + private static final com.google.iam.v3.UpdatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.UpdatePolicyBindingRequest(); + } + + public static com.google.iam.v3.UpdatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..895cc31d9662 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface UpdatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.UpdatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..e307514bc02e --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1172 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +/** + * + * + *
+ * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) + UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePrincipalAccessBoundaryPolicyRequest"); + } + + // Use UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private UpdatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePrincipalAccessBoundaryPolicyRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 1; + private com.google.iam.v3.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) obj; + + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPrincipalAccessBoundaryPolicyFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3.PrincipalAccessBoundaryPolicy, + com.google.iam.v3.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..24822fc6636e --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/java/com/google/iam/v3/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3; + +@com.google.protobuf.Generated +public interface UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/operation_metadata.proto b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/operation_metadata.proto new file mode 100644 index 000000000000..b3865902899b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/operation_metadata.proto @@ -0,0 +1,57 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3"; +option go_package = "cloud.google.com/go/iam/apiv3/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "OperationMetadataProto"; +option java_package = "com.google.iam.v3"; +option php_namespace = "Google\\Cloud\\Iam\\V3"; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_binding_resources.proto b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_binding_resources.proto new file mode 100644 index 000000000000..34bf1b7fa9b2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_binding_resources.proto @@ -0,0 +1,185 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3"; +option go_package = "cloud.google.com/go/iam/apiv3/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingResourcesProto"; +option java_package = "com.google.iam.v3"; +option php_namespace = "Google\\Cloud\\Iam\\V3"; + +// IAM policy binding resource. +message PolicyBinding { + option (google.api.resource) = { + type: "iam.googleapis.com/PolicyBinding" + pattern: "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}" + pattern: "folders/{folder}/locations/{location}/policyBindings/{policy_binding}" + pattern: "projects/{project}/locations/{location}/policyBindings/{policy_binding}" + plural: "policyBindings" + singular: "policyBinding" + }; + + // Target is the full resource name of the resource to which the policy will + // be bound. Immutable once set. + message Target { + // The different types of targets that can be bound to a policy. + oneof target { + // Immutable. Full Resource Name used for principal access boundary policy + // bindings. The principal set must be directly parented by the policy + // binding's parent or same as the parent if the target is a + // project/folder/organization. + // + // Examples: + // * For binding's parented by an organization: + // * Organization: + // `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + // * Workforce Identity: + // `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + // * Workspace Identity: + // `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * For binding's parented by a folder: + // * Folder: + // `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + // * For binding's parented by a project: + // * Project: + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + // * Workload Identity Pool: + // `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + string principal_set = 1 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Different policy kinds supported in this binding. + enum PolicyKind { + // Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0; + + // Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1; + } + + // Identifier. The name of the policy binding, in the format + // `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + // The binding parent is the closest Resource Manager resource (project, + // folder, or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the policy binding. Assigned when + // the policy binding is created. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the policy binding. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the policy binding. Must be less than or equal + // to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. Target is the full resource name of the resource to + // which the policy will be bound. Immutable once set. + Target target = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Immutable. The kind of the policy to attach in this binding. This field + // must be one of the following: + // + // - Left empty (will be automatically set to the policy kind) + // - The input policy kind + PolicyKind policy_kind = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. The resource name of the policy to be bound. The + // binding parent and policy must belong to the same organization. + string policy = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The globally unique ID of the policy to be bound. + string policy_uid = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The condition to apply to the policy binding. When set, the + // `expression` field in the `Expr` must include from 1 to 10 subexpressions, + // joined by the + // "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + // cannot contain more than 250 characters. + // + // The condition is currently only supported when bound to policies of kind + // principal access boundary. + // + // When the bound policy is a principal access boundary policy, the only + // supported attributes in any subexpression are `principal.type` and + // `principal.subject`. An example expression is: "principal.type == + // 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + // 'bob@example.com'". + // + // Allowed operations for `principal.subject`: + // + // - `principal.subject == ` + // - `principal.subject != ` + // - `principal.subject in []` + // - `principal.subject.startsWith()` + // - `principal.subject.endsWith()` + // + // Allowed operations for `principal.type`: + // + // - `principal.type == ` + // - `principal.type != ` + // - `principal.type in []` + // + // Supported principal types are Workspace, Workforce Pool, Workload Pool and + // Service Account. Allowed string must be one of: + // + // - iam.googleapis.com/WorkspaceIdentity + // - iam.googleapis.com/WorkforcePoolIdentity + // - iam.googleapis.com/WorkloadPoolIdentity + // - iam.googleapis.com/ServiceAccount + google.type.Expr condition = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the policy binding was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the policy binding was most recently updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_bindings_service.proto b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_bindings_service.proto new file mode 100644 index 000000000000..219209797ac4 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/policy_bindings_service.proto @@ -0,0 +1,377 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3/operation_metadata.proto"; +import "google/iam/v3/policy_binding_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3"; +option go_package = "cloud.google.com/go/iam/apiv3/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingsServiceProto"; +option java_package = "com.google.iam.v3"; +option php_namespace = "Google\\Cloud\\Iam\\V3"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// An interface for managing Identity and Access Management (IAM) policy +// bindings. +service PolicyBindings { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is created, the policy is applied to the target. + rpc CreatePolicyBinding(CreatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}/policyBindings" + body: "policy_binding" + additional_bindings { + post: "/v3/{parent=folders/*/locations/*}/policyBindings" + body: "policy_binding" + } + additional_bindings { + post: "/v3/{parent=organizations/*/locations/*}/policyBindings" + body: "policy_binding" + } + }; + option (google.api.method_signature) = + "parent,policy_binding,policy_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Gets a policy binding. + rpc GetPolicyBinding(GetPolicyBindingRequest) returns (PolicyBinding) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + get: "/v3/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + get: "/v3/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on the policy and target in the + // binding to update, and the IAM permission to remove the existing policy + // from the binding. Target is immutable and cannot be updated. Once the + // binding is updated, the new policy is applied to the target. + rpc UpdatePolicyBinding(UpdatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}" + body: "policy_binding" + additional_bindings { + patch: "/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + additional_bindings { + patch: "/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + }; + option (google.api.method_signature) = "policy_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is deleted, the policy no longer applies to the target. + rpc DeletePolicyBinding(DeletePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + delete: "/v3/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + delete: "/v3/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists policy bindings. + rpc ListPolicyBindings(ListPolicyBindingsRequest) + returns (ListPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/policyBindings" + additional_bindings { + get: "/v3/{parent=folders/*/locations/*}/policyBindings" + } + additional_bindings { + get: "/v3/{parent=organizations/*/locations/*}/policyBindings" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Search policy bindings by target. Returns all policy binding objects bound + // directly to target. + rpc SearchTargetPolicyBindings(SearchTargetPolicyBindingsRequest) + returns (SearchTargetPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindings" + additional_bindings { + get: "/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + additional_bindings { + get: "/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + }; + option (google.api.method_signature) = "parent,target"; + } +} + +// Request message for CreatePolicyBinding method. +message CreatePolicyBindingRequest { + // Required. The parent resource where this policy binding will be created. + // The binding parent is the closest Resource Manager resource (project, + // folder or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Required. The ID to use for the policy binding, which will become the final + // component of the policy binding's resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string policy_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The policy binding to create. + PolicyBinding policy_binding = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPolicyBinding method. +message GetPolicyBindingRequest { + // Required. The name of the policy binding to retrieve. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Request message for UpdatePolicyBinding method. +message UpdatePolicyBindingRequest { + // Required. The policy binding to update. + // + // The policy binding's `name` field is used to identify the policy binding to + // update. + PolicyBinding policy_binding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePolicyBinding method. +message DeletePolicyBindingRequest { + // Required. The name of the policy binding to delete. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The etag of the policy binding. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPolicyBindings method. +message ListPolicyBindingsRequest { + // Required. The parent resource, which owns the collection of policy + // bindings. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListPolicyBindings` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListPolicyBindings` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. Some eligible fields for filtering are: + // + // + `target` + // + `policy` + // + // Some examples of filter queries: + // + // * `target:ex*`: The binding target's name starts with "ex". + // * `target:example`: The binding target's name is `example`. + // * `policy:example`: The binding policy's name is `example`. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPolicyBindings method. +message ListPolicyBindingsResponse { + // The policy bindings from the specified parent. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsRequest { + // Required. The target resource, which is bound to the policy in the binding. + // + // Format: + // + // * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + // * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + // * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + // * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + // * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + string target = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `SearchTargetPolicyBindingsRequest` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The parent resource where this search will be performed. This + // should be the nearest Resource Manager resource (project, folder, or + // organization) to the target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Response message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsResponse { + // The policy bindings bound to the specified target. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policies_service.proto b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policies_service.proto new file mode 100644 index 000000000000..8eb3898fa5f0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policies_service.proto @@ -0,0 +1,292 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3/operation_metadata.proto"; +import "google/iam/v3/policy_binding_resources.proto"; +import "google/iam/v3/principal_access_boundary_policy_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3"; +option go_package = "cloud.google.com/go/iam/apiv3/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPoliciesServiceProto"; +option java_package = "com.google.iam.v3"; +option php_namespace = "Google\\Cloud\\Iam\\V3"; + +// Manages Identity and Access Management (IAM) principal access boundary +// policies. +service PrincipalAccessBoundaryPolicies { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a principal access boundary policy, and returns a long running + // operation. + rpc CreatePrincipalAccessBoundaryPolicy( + CreatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "parent,principal_access_boundary_policy,principal_access_boundary_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Gets a principal access boundary policy. + rpc GetPrincipalAccessBoundaryPolicy(GetPrincipalAccessBoundaryPolicyRequest) + returns (PrincipalAccessBoundaryPolicy) { + option (google.api.http) = { + get: "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a principal access boundary policy. + rpc UpdatePrincipalAccessBoundaryPolicy( + UpdatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "principal_access_boundary_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a principal access boundary policy. + rpc DeletePrincipalAccessBoundaryPolicy( + DeletePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists principal access boundary policies. + rpc ListPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest) + returns (ListPrincipalAccessBoundaryPoliciesResponse) { + option (google.api.http) = { + get: "/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns all policy bindings that bind a specific policy if a user has + // searchPolicyBindings permission on that policy. + rpc SearchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest) + returns (SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for CreatePrincipalAccessBoundaryPolicyRequest method. +message CreatePrincipalAccessBoundaryPolicyRequest { + // Required. The parent resource where this principal access boundary policy + // will be created. Only organizations are supported. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Required. The ID to use for the principal access boundary policy, which + // will become the final component of the principal access boundary policy's + // resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string principal_access_boundary_policy_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The principal access boundary policy to create. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPrincipalAccessBoundaryPolicy method. +message GetPrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to retrieve. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; +} + +// Request message for UpdatePrincipalAccessBoundaryPolicy method. +message UpdatePrincipalAccessBoundaryPolicyRequest { + // Required. The principal access boundary policy to update. + // + // The principal access boundary policy's `name` field is used to identify the + // policy to update. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePrincipalAccessBoundaryPolicy method. +message DeletePrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to delete. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The etag of the principal access boundary policy. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request will force the deletion of the policy + // even if the policy is referenced in policy bindings. + bool force = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesRequest { + // Required. The parent resource, which owns the collection of principal + // access boundary policies. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of principal access boundary policies to + // return. The service may return fewer than this value. + // + // If unspecified, at most 50 principal access boundary policies will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesResponse { + // The principal access boundary policies from the specified parent. + repeated PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsRequest { + // Required. The name of the principal access boundary policy. + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + // retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + // that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsResponse { + // The policy bindings that reference the specified policy. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policy_resources.proto b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policy_resources.proto new file mode 100644 index 000000000000..d7e3b36a5d62 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3/src/main/proto/google/iam/v3/principal_access_boundary_policy_resources.proto @@ -0,0 +1,128 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3"; +option go_package = "cloud.google.com/go/iam/apiv3/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPolicyResourcesProto"; +option java_package = "com.google.iam.v3"; +option php_namespace = "Google\\Cloud\\Iam\\V3"; + +// An IAM principal access boundary policy resource. +message PrincipalAccessBoundaryPolicy { + option (google.api.resource) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + pattern: "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}" + plural: "principalAccessBoundaryPolicies" + singular: "principalAccessBoundaryPolicy" + }; + + // Identifier. The resource name of the principal access boundary policy. + // + // The following format is supported: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the principal access boundary + // policy. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the principal access boundary. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the principal access boundary policy. Must be + // less than or equal to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the principal access boundary policy was + // created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the principal access boundary policy was most + // recently updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The details for the principal access boundary policy. + PrincipalAccessBoundaryPolicyDetails details = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy details +message PrincipalAccessBoundaryPolicyDetails { + // Required. A list of principal access boundary policy rules. The number of + // rules in a policy is limited to 500. + repeated PrincipalAccessBoundaryPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. + // The version number (for example, `1` or `latest`) that indicates which + // permissions are able to be blocked by the policy. If empty, the PAB policy + // version will be set to the most recent version number at the time of the + // policy's creation. + string enforcement_version = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy rule that defines the resource boundary. +message PrincipalAccessBoundaryPolicyRule { + // An effect to describe the access relationship. + enum Effect { + // Effect unspecified. + EFFECT_UNSPECIFIED = 0; + + // Allows access to the resources in this rule. + ALLOW = 1; + } + + // Optional. The description of the principal access boundary policy rule. + // Must be less than or equal to 256 characters. + string description = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A list of Resource Manager resources. If a resource is listed in + // the rule, then the rule applies for that resource and its descendants. The + // number of resources in a policy is limited to 500 across all rules in the + // policy. + // + // The following resource types are supported: + // + // * Organizations, such as + // `//cloudresourcemanager.googleapis.com/organizations/123`. + // * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + // * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + // or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + repeated string resources = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The access relationship of principals to the resources in this + // rule. + Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/pom.xml b/java-common-iam/proto-proto-google-iam-v1-v3beta/pom.xml new file mode 100644 index 000000000000..909f2b5d1cab --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-iam-v1-v3beta + 1.65.0 + proto-proto-google-iam-v1-v3beta + Proto library for proto-google-iam-v1 + + com.google.api.grpc + proto-google-iam-v1-parent + 1.65.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java new file mode 100644 index 000000000000..32d28241ec78 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java @@ -0,0 +1,1315 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for CreatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class CreatePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.CreatePolicyBindingRequest) + CreatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePolicyBindingRequest"); + } + + // Use CreatePolicyBindingRequest.newBuilder() to construct. + private CreatePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePolicyBindingRequest() { + parent_ = ""; + policyBindingId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePolicyBindingRequest.class, + com.google.iam.v3beta.CreatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + @java.lang.Override + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBindingId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_FIELD_NUMBER = 3; + private com.google.iam.v3beta.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBindingId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBindingId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.CreatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.CreatePolicyBindingRequest other = + (com.google.iam.v3beta.CreatePolicyBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPolicyBindingId().equals(other.getPolicyBindingId())) return false; + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + POLICY_BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingId().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.CreatePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.CreatePolicyBindingRequest) + com.google.iam.v3beta.CreatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePolicyBindingRequest.class, + com.google.iam.v3beta.CreatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.CreatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policyBindingId_ = ""; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.CreatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest build() { + com.google.iam.v3beta.CreatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.CreatePolicyBindingRequest result = + new com.google.iam.v3beta.CreatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.CreatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyBindingId_ = policyBindingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.CreatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.CreatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.CreatePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.CreatePolicyBindingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPolicyBindingId().isEmpty()) { + policyBindingId_ = other.policyBindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + policyBindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyBindingId() { + policyBindingId_ = getDefaultInstance().getPolicyBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3beta.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + internalGetPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.CreatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.CreatePolicyBindingRequest) + private static final com.google.iam.v3beta.CreatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.CreatePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..f38c345e13fe --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface CreatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.CreatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + java.lang.String getPolicyBindingId(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + com.google.protobuf.ByteString getPolicyBindingIdBytes(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3beta.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..08b7130ba385 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1328 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class CreatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePrincipalAccessBoundaryPolicyRequest"); + } + + // Use CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private CreatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePrincipalAccessBoundaryPolicyRequest() { + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalAccessBoundaryPolicyId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 3; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(principalAccessBoundaryPolicyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(principalAccessBoundaryPolicyId_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPrincipalAccessBoundaryPolicyId().equals(other.getPrincipalAccessBoundaryPolicyId())) + return false; + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicyId().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPrincipalAccessBoundaryPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principalAccessBoundaryPolicyId_ = principalAccessBoundaryPolicyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPrincipalAccessBoundaryPolicyId().isEmpty()) { + principalAccessBoundaryPolicyId_ = other.principalAccessBoundaryPolicyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + principalAccessBoundaryPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalAccessBoundaryPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrincipalAccessBoundaryPolicyId() { + principalAccessBoundaryPolicyId_ = getDefaultInstance().getPrincipalAccessBoundaryPolicyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000004); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..d5e2f647d52b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface CreatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + java.lang.String getPrincipalAccessBoundaryPolicyId(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java new file mode 100644 index 000000000000..52a310ce1fce --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java @@ -0,0 +1,956 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for DeletePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class DeletePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.DeletePolicyBindingRequest) + DeletePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePolicyBindingRequest"); + } + + // Use DeletePolicyBindingRequest.newBuilder() to construct. + private DeletePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePolicyBindingRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePolicyBindingRequest.class, + com.google.iam.v3beta.DeletePolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.DeletePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.DeletePolicyBindingRequest other = + (com.google.iam.v3beta.DeletePolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.DeletePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeletePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.DeletePolicyBindingRequest) + com.google.iam.v3beta.DeletePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePolicyBindingRequest.class, + com.google.iam.v3beta.DeletePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.DeletePolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.DeletePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest build() { + com.google.iam.v3beta.DeletePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.DeletePolicyBindingRequest result = + new com.google.iam.v3beta.DeletePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.DeletePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.DeletePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.DeletePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.DeletePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.DeletePolicyBindingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.DeletePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.DeletePolicyBindingRequest) + private static final com.google.iam.v3beta.DeletePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.DeletePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..17a464473b9d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface DeletePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.DeletePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..e7bab0351fcb --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1041 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for DeletePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class DeletePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePrincipalAccessBoundaryPolicyRequest"); + } + + // Use DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private DeletePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int FORCE_FIELD_NUMBER = 4; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (force_ != false) { + output.writeBool(4, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DeletePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + force_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000008); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..e9b61bc2e153 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface DeletePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java new file mode 100644 index 000000000000..052e3ef04376 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FolderLocationName implements ResourceName { + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String folder; + private final String location; + + @Deprecated + protected FolderLocationName() { + folder = null; + location = null; + } + + private FolderLocationName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderLocationName of(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static String format(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static FolderLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER_LOCATION.validatedMatch( + formattedString, "FolderLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("folder"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FolderLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER_LOCATION.instantiate("folder", folder, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FolderLocationName that = ((FolderLocationName) o); + return Objects.equals(this.folder, that.folder) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for folders/{folder}/locations/{location}. */ + public static class Builder { + private String folder; + private String location; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(FolderLocationName folderLocationName) { + this.folder = folderLocationName.folder; + this.location = folderLocationName.location; + } + + public FolderLocationName build() { + return new FolderLocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java new file mode 100644 index 000000000000..78d0029e6e42 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java @@ -0,0 +1,658 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for GetPolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class GetPolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.GetPolicyBindingRequest) + GetPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyBindingRequest"); + } + + // Use GetPolicyBindingRequest.newBuilder() to construct. + private GetPolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPolicyBindingRequest.class, + com.google.iam.v3beta.GetPolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.GetPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.GetPolicyBindingRequest other = + (com.google.iam.v3beta.GetPolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.GetPolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetPolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.GetPolicyBindingRequest) + com.google.iam.v3beta.GetPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPolicyBindingRequest.class, + com.google.iam.v3beta.GetPolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.GetPolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest build() { + com.google.iam.v3beta.GetPolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest buildPartial() { + com.google.iam.v3beta.GetPolicyBindingRequest result = + new com.google.iam.v3beta.GetPolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.GetPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.GetPolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.GetPolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.GetPolicyBindingRequest other) { + if (other == com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.GetPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.GetPolicyBindingRequest) + private static final com.google.iam.v3beta.GetPolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.GetPolicyBindingRequest(); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..1108e3dd3000 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface GetPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.GetPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..ad93b8c245d9 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for GetPrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetPrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPrincipalAccessBoundaryPolicyRequest"); + } + + // Use GetPrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private GetPrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetPrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..86950afa435e --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface GetPrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java new file mode 100644 index 000000000000..515549b22560 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java @@ -0,0 +1,1255 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class ListPolicyBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPolicyBindingsRequest) + ListPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBindingsRequest"); + } + + // Use ListPolicyBindingsRequest.newBuilder() to construct. + private ListPolicyBindingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsRequest.class, + com.google.iam.v3beta.ListPolicyBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.ListPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPolicyBindingsRequest other = + (com.google.iam.v3beta.ListPolicyBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.ListPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPolicyBindingsRequest) + com.google.iam.v3beta.ListPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsRequest.class, + com.google.iam.v3beta.ListPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest build() { + com.google.iam.v3beta.ListPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.ListPolicyBindingsRequest result = + new com.google.iam.v3beta.ListPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.ListPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.ListPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3beta.ListPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.ListPolicyBindingsRequest other) { + if (other == com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.ListPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPolicyBindingsRequest) + private static final com.google.iam.v3beta.ListPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..d2e42b7448c2 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface ListPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java new file mode 100644 index 000000000000..adb633941f94 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java @@ -0,0 +1,1122 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class ListPolicyBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPolicyBindingsResponse) + ListPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBindingsResponse"); + } + + // Use ListPolicyBindingsResponse.newBuilder() to construct. + private ListPolicyBindingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsResponse.class, + com.google.iam.v3beta.ListPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.ListPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPolicyBindingsResponse other = + (com.google.iam.v3beta.ListPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.ListPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPolicyBindingsResponse) + com.google.iam.v3beta.ListPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsResponse.class, + com.google.iam.v3beta.ListPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse build() { + com.google.iam.v3beta.ListPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse buildPartial() { + com.google.iam.v3beta.ListPolicyBindingsResponse result = + new com.google.iam.v3beta.ListPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.ListPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.ListPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.ListPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3beta.ListPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.ListPolicyBindingsResponse other) { + if (other == com.google.iam.v3beta.ListPolicyBindingsResponse.getDefaultInstance()) + return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.ListPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPolicyBindingsResponse) + private static final com.google.iam.v3beta.ListPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..abedd3fd932a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface ListPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java new file mode 100644 index 000000000000..0d3c0d5eea33 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java @@ -0,0 +1,998 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListPrincipalAccessBoundaryPoliciesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPrincipalAccessBoundaryPoliciesRequest"); + } + + // Use ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest other = + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest build() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest buildPartial() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result = + new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) { + return mergeFrom((com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest other) { + if (other + == com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + private static final com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest(); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..a44089c838fa --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface ListPrincipalAccessBoundaryPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java new file mode 100644 index 000000000000..6944ba49d040 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java @@ -0,0 +1,1206 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListPrincipalAccessBoundaryPoliciesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPrincipalAccessBoundaryPoliciesResponse"); + } + + // Use ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesResponse() { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + principalAccessBoundaryPolicies_; + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public int getPrincipalAccessBoundaryPoliciesCount() { + return principalAccessBoundaryPolicies_.size(); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < principalAccessBoundaryPolicies_.size(); i++) { + output.writeMessage(1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < principalAccessBoundaryPolicies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse other = + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) obj; + + if (!getPrincipalAccessBoundaryPoliciesList() + .equals(other.getPrincipalAccessBoundaryPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPrincipalAccessBoundaryPoliciesCount() > 0) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + // Construct using + // com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + } else { + principalAccessBoundaryPolicies_ = null; + principalAccessBoundaryPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse build() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse buildPartial() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result = + new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPolicies_; + } else { + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) { + return mergeFrom((com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse other) { + if (other + == com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance()) + return this; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPolicies_.isEmpty()) { + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.addAll(other.principalAccessBoundaryPolicies_); + } + onChanged(); + } + } else { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPoliciesBuilder_.isEmpty()) { + principalAccessBoundaryPoliciesBuilder_.dispose(); + principalAccessBoundaryPoliciesBuilder_ = null; + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPoliciesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + : null; + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages( + other.principalAccessBoundaryPolicies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy m = + input.readMessage( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.parser(), + extensionRegistry); + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(m); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + + private void ensurePrincipalAccessBoundaryPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + new java.util.ArrayList( + principalAccessBoundaryPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPoliciesBuilder_; + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public int getPrincipalAccessBoundaryPoliciesCount() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.size(); + } else { + return principalAccessBoundaryPoliciesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addAllPrincipalAccessBoundaryPolicies( + java.lang.Iterable values) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, principalAccessBoundaryPolicies_); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder clearPrincipalAccessBoundaryPolicies() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder removePrincipalAccessBoundaryPolicies(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.remove(index); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPoliciesBuilder(int index) { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + if (principalAccessBoundaryPoliciesBuilder_ != null) { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder() { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder(int index) { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder( + index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesBuilderList() { + return internalGetPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPoliciesFieldBuilder() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + principalAccessBoundaryPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + principalAccessBoundaryPolicies_ = null; + } + return principalAccessBoundaryPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + private static final com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse(); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..2200acc13566 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface ListPrincipalAccessBoundaryPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies(int index); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + int getPrincipalAccessBoundaryPoliciesCount(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java new file mode 100644 index 000000000000..19a5b6f85a09 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java new file mode 100644 index 000000000000..2754782e92e5 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java @@ -0,0 +1,1867 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.OperationMetadata.class, + com.google.iam.v3beta.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.OperationMetadata)) { + return super.equals(obj); + } + com.google.iam.v3beta.OperationMetadata other = (com.google.iam.v3beta.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.OperationMetadata) + com.google.iam.v3beta.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.OperationMetadata.class, + com.google.iam.v3beta.OperationMetadata.Builder.class); + } + + // Construct using com.google.iam.v3beta.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata getDefaultInstanceForType() { + return com.google.iam.v3beta.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata build() { + com.google.iam.v3beta.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata buildPartial() { + com.google.iam.v3beta.OperationMetadata result = + new com.google.iam.v3beta.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.OperationMetadata) { + return mergeFrom((com.google.iam.v3beta.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.OperationMetadata other) { + if (other == com.google.iam.v3beta.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.OperationMetadata) + private static final com.google.iam.v3beta.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.OperationMetadata(); + } + + public static com.google.iam.v3beta.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..548c27c8abc6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java new file mode 100644 index 000000000000..4009c1db4bd3 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/operation_metadata.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public final class OperationMetadataProto extends com.google.protobuf.GeneratedFile { + private OperationMetadataProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadataProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/iam/v3beta/operation_metadata.p" + + "roto\022\021google.iam.v3beta\032\037google/api/fiel" + + "d_behavior.proto\032\037google/protobuf/timest" + + "amp.proto\"\200\002\n\021OperationMetadata\0224\n\013creat" + + "e_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\t" + + "B\003\340A\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340" + + "A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\003B\224\001\n\025com.goo" + + "gle.iam.v3betaB\026OperationMetadataProtoP\001" + + "Z-cloud.google.com/go/iam/apiv3beta/iamp" + + "b;iampb\252\002\027Google.Cloud.Iam.V3Beta\312\002\027Goog" + + "le\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_OperationMetadata_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java new file mode 100644 index 000000000000..8a521b39bd02 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationLocationName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + + @Deprecated + protected OrganizationLocationName() { + organization = null; + location = null; + } + + private OrganizationLocationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationLocationName of(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); + } + + public static String format(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); + } + + public static OrganizationLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION.validatedMatch( + formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + OrganizationLocationName that = ((OrganizationLocationName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/locations/{location}. */ + public static class Builder { + private String organization; + private String location; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(OrganizationLocationName organizationLocationName) { + this.organization = organizationLocationName.organization; + this.location = organizationLocationName.location; + } + + public OrganizationLocationName build() { + return new OrganizationLocationName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java new file mode 100644 index 000000000000..6ecbe5324eef --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java @@ -0,0 +1,5012 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * IAM policy binding resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding} + */ +@com.google.protobuf.Generated +public final class PolicyBinding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PolicyBinding) + PolicyBindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBinding"); + } + + // Use PolicyBinding.newBuilder() to construct. + private PolicyBinding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyBinding() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.class, + com.google.iam.v3beta.PolicyBinding.Builder.class); + } + + /** + * + * + *
+   * Different policy kinds supported in this binding.
+   * 
+ * + * Protobuf enum {@code google.iam.v3beta.PolicyBinding.PolicyKind} + */ + public enum PolicyKind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + POLICY_KIND_UNSPECIFIED(0), + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + PRINCIPAL_ACCESS_BOUNDARY(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyKind"); + } + + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + public static final int POLICY_KIND_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + public static final int PRINCIPAL_ACCESS_BOUNDARY_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PolicyKind forNumber(int value) { + switch (value) { + case 0: + return POLICY_KIND_UNSPECIFIED; + case 1: + return PRINCIPAL_ACCESS_BOUNDARY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PolicyKind findValueByNumber(int number) { + return PolicyKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBinding.getDescriptor().getEnumTypes().get(0); + } + + private static final PolicyKind[] VALUES = values(); + + public static PolicyKind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PolicyKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3beta.PolicyBinding.PolicyKind) + } + + public interface TargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PolicyBinding.Target) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + boolean hasPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + java.lang.String getPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + com.google.protobuf.ByteString getPrincipalSetBytes(); + + com.google.iam.v3beta.PolicyBinding.Target.TargetCase getTargetCase(); + } + + /** + * + * + *
+   * Target is the full resource name of the resource to which the policy will
+   * be bound. Immutable once set.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding.Target} + */ + public static final class Target extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PolicyBinding.Target) + TargetOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Target"); + } + + // Use Target.newBuilder() to construct. + private Target(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Target() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.Target.class, + com.google.iam.v3beta.PolicyBinding.Target.Builder.class); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRINCIPAL_SET(1), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 1: + return PRINCIPAL_SET; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int PRINCIPAL_SET_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     * * Organization:
+     * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     * * Workforce Identity:
+     * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     * * Workspace Identity:
+     * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     * * Folder:
+     * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     * * Project:
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     * * Workload Identity Pool:
+     * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (targetCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.PolicyBinding.Target)) { + return super.equals(obj); + } + com.google.iam.v3beta.PolicyBinding.Target other = + (com.google.iam.v3beta.PolicyBinding.Target) obj; + + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 1: + if (!getPrincipalSet().equals(other.getPrincipalSet())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (targetCase_) { + case 1: + hash = (37 * hash) + PRINCIPAL_SET_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalSet().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.PolicyBinding.Target prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Target is the full resource name of the resource to which the policy will
+     * be bound. Immutable once set.
+     * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding.Target} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PolicyBinding.Target) + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.Target.class, + com.google.iam.v3beta.PolicyBinding.Target.Builder.class); + } + + // Construct using com.google.iam.v3beta.PolicyBinding.Target.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target getDefaultInstanceForType() { + return com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target build() { + com.google.iam.v3beta.PolicyBinding.Target result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target buildPartial() { + com.google.iam.v3beta.PolicyBinding.Target result = + new com.google.iam.v3beta.PolicyBinding.Target(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PolicyBinding.Target result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.iam.v3beta.PolicyBinding.Target result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.PolicyBinding.Target) { + return mergeFrom((com.google.iam.v3beta.PolicyBinding.Target) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PolicyBinding.Target other) { + if (other == com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance()) return this; + switch (other.getTargetCase()) { + case PRINCIPAL_SET: + { + targetCase_ = 1; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 1; + target_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + @java.lang.Override + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + @java.lang.Override + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalSet() { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       * * Organization:
+       * `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       * * Workforce Identity:
+       * `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       * * Workspace Identity:
+       * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       * * Folder:
+       * `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       * * Project:
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       * * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       * * Workload Identity Pool:
+       * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.PolicyBinding.Target) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PolicyBinding.Target) + private static final com.google.iam.v3beta.PolicyBinding.Target DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PolicyBinding.Target(); + } + + public static com.google.iam.v3beta.PolicyBinding.Target getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Target parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TARGET_FIELD_NUMBER = 6; + private com.google.iam.v3beta.PolicyBinding.Target target_; + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target getTarget() { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + + public static final int POLICY_KIND_FIELD_NUMBER = 11; + private int policyKind_ = 0; + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3beta.PolicyBinding.PolicyKind result = + com.google.iam.v3beta.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3beta.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + public static final int POLICY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object policy_ = ""; + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_UID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyUid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + @java.lang.Override + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyUid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 8; + private com.google.type.Expr condition_; + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3beta.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyUid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, policyUid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3beta.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyUid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, policyUid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.PolicyBinding)) { + return super.equals(obj); + } + com.google.iam.v3beta.PolicyBinding other = (com.google.iam.v3beta.PolicyBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (policyKind_ != other.policyKind_) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (!getPolicyUid().equals(other.getPolicyUid())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + POLICY_KIND_FIELD_NUMBER; + hash = (53 * hash) + policyKind_; + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + POLICY_UID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyUid().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.PolicyBinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * IAM policy binding resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PolicyBinding) + com.google.iam.v3beta.PolicyBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.class, + com.google.iam.v3beta.PolicyBinding.Builder.class); + } + + // Construct using com.google.iam.v3beta.PolicyBinding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTargetFieldBuilder(); + internalGetConditionFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getDefaultInstanceForType() { + return com.google.iam.v3beta.PolicyBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding build() { + com.google.iam.v3beta.PolicyBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding buildPartial() { + com.google.iam.v3beta.PolicyBinding result = new com.google.iam.v3beta.PolicyBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PolicyBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.target_ = targetBuilder_ == null ? target_ : targetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.policyKind_ = policyKind_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.policy_ = policy_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.policyUid_ = policyUid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.PolicyBinding) { + return mergeFrom((com.google.iam.v3beta.PolicyBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PolicyBinding other) { + if (other == com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.policyKind_ != 0) { + setPolicyKindValue(other.getPolicyKindValue()); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getPolicyUid().isEmpty()) { + policyUid_ = other.policyUid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetTargetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 82 + case 88: + { + policyKind_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 88 + case 98: + { + policyUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.iam.v3beta.PolicyBinding.Target target_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder> + targetBuilder_; + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.iam.v3beta.PolicyBinding.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3beta.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + } else { + targetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3beta.PolicyBinding.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.iam.v3beta.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && target_ != null + && target_ != com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance()) { + getTargetBuilder().mergeFrom(value); + } else { + target_ = value; + } + } else { + targetBuilder_.mergeFrom(value); + } + if (target_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000020); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Target.Builder getTargetBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetTargetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder> + internalGetTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private int policyKind_ = 0; + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKindValue(int value) { + policyKind_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3beta.PolicyBinding.PolicyKind result = + com.google.iam.v3beta.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3beta.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKind(com.google.iam.v3beta.PolicyBinding.PolicyKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + policyKind_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicyKind() { + bitField0_ = (bitField0_ & ~0x00000040); + policyKind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + policy_ = getDefaultInstance().getPolicy(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object policyUid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyUid() { + policyUid_ = getDefaultInstance().getPolicyUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + conditionBuilder_; + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && condition_ != null + && condition_ != com.google.type.Expr.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + if (condition_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000200); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + internalGetConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.PolicyBinding) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PolicyBinding) + private static final com.google.iam.v3beta.PolicyBinding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PolicyBinding(); + } + + public static com.google.iam.v3beta.PolicyBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyBinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java new file mode 100644 index 000000000000..e8e733b99898 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java @@ -0,0 +1,449 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PolicyBindingName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate FOLDER_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate PROJECT_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/policyBindings/{policy_binding}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String location; + private final String policyBinding; + private final String folder; + private final String project; + + @Deprecated + protected PolicyBindingName() { + organization = null; + location = null; + policyBinding = null; + folder = null; + project = null; + } + + private PolicyBindingName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(FolderLocationPolicyBindingBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + project = null; + pathTemplate = FOLDER_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(ProjectLocationPolicyBindingBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + folder = null; + pathTemplate = PROJECT_LOCATION_POLICY_BINDING; + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newOrganizationLocationPolicyBindingBuilder() { + return new Builder(); + } + + public static FolderLocationPolicyBindingBuilder newFolderLocationPolicyBindingBuilder() { + return new FolderLocationPolicyBindingBuilder(); + } + + public static ProjectLocationPolicyBindingBuilder newProjectLocationPolicyBindingBuilder() { + return new ProjectLocationPolicyBindingBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyBindingName of(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static String format(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static PolicyBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_POLICY_BINDING.match(formattedString); + return ofOrganizationLocationPolicyBindingName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (FOLDER_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION_POLICY_BINDING.match(formattedString); + return ofFolderLocationPolicyBindingName( + matchMap.get("folder"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (PROJECT_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_POLICY_BINDING.match(formattedString); + return ofProjectLocationPolicyBindingName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("policy_binding")); + } + throw new ValidationException("PolicyBindingName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PolicyBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString) + || FOLDER_LOCATION_POLICY_BINDING.matches(formattedString) + || PROJECT_LOCATION_POLICY_BINDING.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (policyBinding != null) { + fieldMapBuilder.put("policy_binding", policyBinding); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PolicyBindingName that = ((PolicyBindingName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.policyBinding, that.policyBinding) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(policyBinding); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** + * Builder for organizations/{organization}/locations/{location}/policyBindings/{policy_binding}. + */ + public static class Builder { + private String organization; + private String location; + private String policyBinding; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + private Builder(PolicyBindingName policyBindingName) { + Preconditions.checkArgument( + Objects.equals(policyBindingName.pathTemplate, ORGANIZATION_LOCATION_POLICY_BINDING), + "toBuilder is only supported when PolicyBindingName has the pattern of" + + " organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + this.organization = policyBindingName.organization; + this.location = policyBindingName.location; + this.policyBinding = policyBindingName.policyBinding; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/policyBindings/{policy_binding}. */ + public static class FolderLocationPolicyBindingBuilder { + private String folder; + private String location; + private String policyBinding; + + protected FolderLocationPolicyBindingBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public FolderLocationPolicyBindingBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/policyBindings/{policy_binding}. */ + public static class ProjectLocationPolicyBindingBuilder { + private String project; + private String location; + private String policyBinding; + + protected ProjectLocationPolicyBindingBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public ProjectLocationPolicyBindingBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java new file mode 100644 index 000000000000..2030cb635c0b --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java @@ -0,0 +1,604 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface PolicyBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PolicyBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.iam.v3beta.PolicyBinding.Target getTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + int getPolicyKindValue(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + java.lang.String getPolicy(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + java.lang.String getPolicyUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + com.google.protobuf.ByteString getPolicyUidBytes(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + com.google.type.Expr getCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java new file mode 100644 index 000000000000..a103e75d10e6 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_binding_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public final class PolicyBindingResourcesProto extends com.google.protobuf.GeneratedFile { + private PolicyBindingResourcesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBindingResourcesProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "0google/iam/v3beta/policy_binding_resou" + + "rces.proto\022\021google.iam.v3beta\032\037google/ap" + + "i/field_behavior.proto\032\033google/api/field" + + "_info.proto\032\031google/api/resource.proto\032\037" + + "google/protobuf/timestamp.proto\032\026google/type/expr.proto\"\342\007\n\r" + + "PolicyBinding\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022K\n" + + "\013annotations\030\005 \003(\01321.google.iam.v" + + "3beta.PolicyBinding.AnnotationsEntryB\003\340A\001\022?\n" + + "\006target\030\006" + + " \001(\0132\'.google.iam.v3beta.PolicyBinding.TargetB\006\340A\005\340A\002\022E\n" + + "\013policy_kind\030\013" + + " \001(\0162+.google.iam.v3beta.PolicyBinding.PolicyKindB\003\340A\005\022\026\n" + + "\006policy\030\007 \001(\tB\006\340A\005\340A\002\022\027\n\n" + + "policy_uid\030\014 \001(\tB\003\340A\003\022)\n" + + "\tcondition\030\010 \001(\0132\021.google.type.ExprB\003\340A\001\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0320\n" + + "\006Target\022\034\n\r" + + "principal_set\030\001 \001(\tB\003\340A\005H\000B\010\n" + + "\006target\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"H\n\n" + + "PolicyKind\022\033\n" + + "\027POLICY_KIND_UNSPECIFIED\020\000\022\035\n" + + "\031PRINCIPAL_ACCESS_BOUNDARY\020\001:\250\002\352A\244\002\n" + + " iam.googleapis.com/PolicyBinding\022Qorganizations/{organization}/locations/{loca" + + "tion}/policyBindings/{policy_binding}\022Efolders/{folder}/locations/{location}/pol" + + "icyBindings/{policy_binding}\022Gprojects/{" + + "project}/locations/{location}/policyBindings/{policy_binding}*\016policyBindings2\r" + + "policyBindingB\231\001\n" + + "\025com.google.iam.v3betaB\033PolicyBindingResourcesProtoP\001Z-cloud.goo" + + "gle.com/go/iam/apiv3beta/iampb;iampb\252\002\027G" + + "oogle.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_PolicyBinding_descriptor = getDescriptor().getMessageType(0); + internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "Target", + "PolicyKind", + "Policy", + "PolicyUid", + "Condition", + "CreateTime", + "UpdateTime", + }); + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor = + internal_static_google_iam_v3beta_PolicyBinding_descriptor.getNestedType(0); + internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor, + new java.lang.String[] { + "PrincipalSet", "Target", + }); + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor = + internal_static_google_iam_v3beta_PolicyBinding_descriptor.getNestedType(1); + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.ExprProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java new file mode 100644 index 000000000000..51de0ef39491 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java @@ -0,0 +1,286 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public final class PolicyBindingsServiceProto extends com.google.protobuf.GeneratedFile { + private PolicyBindingsServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBindingsServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "/google/iam/v3beta/policy_bindings_serv" + + "ice.proto\022\021google.iam.v3beta\032\034google/api" + + "/annotations.proto\032\027google/api/client.pr" + + "oto\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032*google/iam/v3beta/operation_metadata.proto\0320google/iam/" + + "v3beta/policy_binding_resources.proto\032#g" + + "oogle/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\"\321\001\n" + + "\032CreatePolicyBindingRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\036\n" + + "\021policy_binding_id\030\002 \001(\tB\003\340A\002\022=\n" + + "\016policy_binding\030\003 \001(\0132" + + " .google.iam.v3beta.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"Q\n" + + "\027GetPolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\"\255\001\n" + + "\032UpdatePolicyBindingRequest\022=\n" + + "\016policy_binding\030\001 \001(\0132" + + " .google.iam.v3beta.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\0224\n" + + "\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\203\001\n" + + "\032DeletePolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\"\233\001\n" + + "\031ListPolicyBindingsRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"u\n" + + "\032ListPolicyBindingsResponse\0229\n" + + "\017policy_bindings\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\243\001\n" + + "!SearchTargetPolicyBindingsRequest\022\023\n" + + "\006target\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\0228\n" + + "\006parent\030\005 \001(\tB(\340A\002\372A\"\022 iam.googleapis.com/PolicyBinding\"}\n" + + "\"SearchTargetPolicyBindingsResponse\0229\n" + + "\017policy_bindings\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\0012\214\022\n" + + "\016PolicyBindings\022\234\003\n" + + "\023CreatePolicyBinding\022-.go" + + "ogle.iam.v3beta.CreatePolicyBindingRequest\032\035.google.longrunning.Operation\"\266\002\312A\"\n" + + "\r" + + "PolicyBinding\022\021OperationMetadata\332A\'pare" + + "nt,policy_binding,policy_binding_id\202\323\344\223\002" + + "\340\001\"6/v3beta/{parent=projects/*/locations" + + "/*}/policyBindings:\016policy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/pol" + + "icyBindings:\016policy_bindingZM\";/v3beta/{" + + "parent=organizations/*/locations/*}/policyBindings:\016policy_binding\022\241\002\n" + + "\020GetPolicyBinding\022*.google.iam.v3beta.GetPolicyBindingRequest\032" + + " .google.iam.v3beta.PolicyBi" + + "nding\"\276\001\332A\004name\202\323\344\223\002\260\001\0226/v3beta/{name=pr" + + "ojects/*/locations/*/policyBindings/*}Z7\0225/v3beta/{name=folders/*/locations/*/po" + + "licyBindings/*}Z=\022;/v3beta/{name=organiz" + + "ations/*/locations/*/policyBindings/*}\022\274\003\n" + + "\023UpdatePolicyBinding\022-.google.iam.v3be" + + "ta.UpdatePolicyBindingRequest\032\035.google.longrunning.Operation\"\326\002\312A\"\n\r" + + "PolicyBinding\022\021OperationMetadata\332A\032policy_binding,up" + + "date_mask\202\323\344\223\002\215\0022E/v3beta/{policy_bindin" + + "g.name=projects/*/locations/*/policyBindings/*}:\016policy_bindingZV2D/v3beta/{poli" + + "cy_binding.name=folders/*/locations/*/policyBindings/*}:\016policy_bindingZ\\2J/v3be" + + "ta/{policy_binding.name=organizations/*/" + + "locations/*/policyBindings/*}:\016policy_binding\022\321\002\n" + + "\023DeletePolicyBinding\022-.google.i" + + "am.v3beta.DeletePolicyBindingRequest\032\035.google.longrunning.Operation\"\353\001\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004na" + + "me\202\323\344\223\002\260\001*6/v3beta/{name=projects/*/loca" + + "tions/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/" + + "*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\022\264\002\n" + + "\022ListPolicyBindings\022,.google.iam.v3beta.ListPolicyB" + + "indingsRequest\032-.google.iam.v3beta.ListP" + + "olicyBindingsResponse\"\300\001\332A\006parent\202\323\344\223\002\260\001" + + "\0226/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\0225/v3beta/{parent=fold" + + "ers/*/locations/*}/policyBindingsZ=\022;/v3" + + "beta/{parent=organizations/*/locations/*}/policyBindings\022\244\003\n" + + "\032SearchTargetPolicyBindings\0224.google.iam.v3beta.SearchTarget" + + "PolicyBindingsRequest\0325.google.iam.v3bet" + + "a.SearchTargetPolicyBindingsResponse\"\230\002\332A\r" + + "parent,target\202\323\344\223\002\201\002\022Q/v3beta/{parent=" + + "projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\022P/v3beta/{pa" + + "rent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\022V/v3beta" + + "/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\032" + + "F\312A\022iam.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\304\002\n" + + "\025com.google.iam.v3betaB\032PolicyBindingsService" + + "ProtoP\001Z-cloud.google.com/go/iam/apiv3be" + + "ta/iampb;iampb\252\002\027Google.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3beta\352A\\\n" + + "\'iam.googleapis.com/OrganizationLocation\0221organiza" + + "tions/{organization}/locations/{location}\352AJ\n" + + "!iam.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(), + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "PolicyBindingId", "PolicyBinding", "ValidateOnly", + }); + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "PolicyBinding", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", + }); + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Target", "PageSize", "PageToken", "Parent", + }); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(); + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java new file mode 100644 index 000000000000..a661d6c0a56c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java @@ -0,0 +1,296 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPoliciesServiceProto + extends com.google.protobuf.GeneratedFile { + private PrincipalAccessBoundaryPoliciesServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPoliciesServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nBgoogle/iam/v3beta/principal_access_bou" + + "ndary_policies_service.proto\022\021google.iam" + + ".v3beta\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\032*google/iam/v3beta/operation_metadata" + + ".proto\0320google/iam/v3beta/policy_binding" + + "_resources.proto\032Bgoogle/iam/v3beta/prin" + + "cipal_access_boundary_policy_resources.p" + + "roto\032#google/longrunning/operations.prot" + + "o\032\033google/protobuf/empty.proto\032 google/p" + + "rotobuf/field_mask.proto\"\245\002\n*CreatePrinc" + + "ipalAccessBoundaryPolicyRequest\022H\n\006paren" + + "t\030\001 \001(\tB8\340A\002\372A2\0220iam.googleapis.com/Prin" + + "cipalAccessBoundaryPolicy\0220\n#principal_a" + + "ccess_boundary_policy_id\030\002 \001(\tB\003\340A\002\022_\n p" + + "rincipal_access_boundary_policy\030\003 \001(\01320." + + "google.iam.v3beta.PrincipalAccessBoundar" + + "yPolicyB\003\340A\002\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001" + + "\"q\n\'GetPrincipalAccessBoundaryPolicyRequ" + + "est\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0iam.googleapi" + + "s.com/PrincipalAccessBoundaryPolicy\"\337\001\n*" + + "UpdatePrincipalAccessBoundaryPolicyReque" + + "st\022_\n principal_access_boundary_policy\030\001" + + " \001(\01320.google.iam.v3beta.PrincipalAccess" + + "BoundaryPolicyB\003\340A\002\022\032\n\rvalidate_only\030\002 \001" + + "(\010B\003\340A\001\0224\n\013update_mask\030\003 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\001\"\267\001\n*DeletePrincipa" + + "lAccessBoundaryPolicyRequest\022F\n\004name\030\001 \001" + + "(\tB8\340A\002\372A2\n0iam.googleapis.com/Principal" + + "AccessBoundaryPolicy\022\021\n\004etag\030\002 \001(\tB\003\340A\001\022" + + "\032\n\rvalidate_only\030\003 \001(\010B\003\340A\001\022\022\n\005force\030\004 \001" + + "(\010B\003\340A\001\"\247\001\n*ListPrincipalAccessBoundaryP" + + "oliciesRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\0220" + + "iam.googleapis.com/PrincipalAccessBounda" + + "ryPolicy\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage" + + "_token\030\003 \001(\tB\003\340A\001\"\251\001\n+ListPrincipalAcces" + + "sBoundaryPoliciesResponse\022\\\n\"principal_a" + + "ccess_boundary_policies\030\001 \003(\01320.google.i" + + "am.v3beta.PrincipalAccessBoundaryPolicy\022" + + "\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"\255\001\n2Search" + + "PrincipalAccessBoundaryPolicyBindingsReq" + + "uest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0iam.googleap" + + "is.com/PrincipalAccessBoundaryPolicy\022\026\n\t" + + "page_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\t" + + "B\003\340A\001\"\216\001\n3SearchPrincipalAccessBoundaryP" + + "olicyBindingsResponse\0229\n\017policy_bindings" + + "\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding" + + "\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\0012\250\017\n\037Princ" + + "ipalAccessBoundaryPolicies\022\377\002\n#CreatePri" + + "ncipalAccessBoundaryPolicy\022=.google.iam." + + "v3beta.CreatePrincipalAccessBoundaryPoli" + + "cyRequest\032\035.google.longrunning.Operation" + + "\"\371\001\312A2\n\035PrincipalAccessBoundaryPolicy\022\021O" + + "perationMetadata\332AKparent,principal_acce" + + "ss_boundary_policy,principal_access_boun" + + "dary_policy_id\202\323\344\223\002p\"L/v3beta/{parent=or" + + "ganizations/*/locations/*}/principalAcce" + + "ssBoundaryPolicies: principal_access_bou" + + "ndary_policy\022\355\001\n GetPrincipalAccessBound" + + "aryPolicy\022:.google.iam.v3beta.GetPrincip" + + "alAccessBoundaryPolicyRequest\0320.google.i" + + "am.v3beta.PrincipalAccessBoundaryPolicy\"" + + "[\332A\004name\202\323\344\223\002N\022L/v3beta/{name=organizati" + + "ons/*/locations/*/principalAccessBoundar" + + "yPolicies/*}\022\202\003\n#UpdatePrincipalAccessBo" + + "undaryPolicy\022=.google.iam.v3beta.UpdateP" + + "rincipalAccessBoundaryPolicyRequest\032\035.go" + + "ogle.longrunning.Operation\"\374\001\312A2\n\035Princi" + + "palAccessBoundaryPolicy\022\021OperationMetada" + + "ta\332A,principal_access_boundary_policy,up" + + "date_mask\202\323\344\223\002\221\0012m/v3beta/{principal_acc" + + "ess_boundary_policy.name=organizations/*" + + "/locations/*/principalAccessBoundaryPoli" + + "cies/*}: principal_access_boundary_polic" + + "y\022\216\002\n#DeletePrincipalAccessBoundaryPolic" + + "y\022=.google.iam.v3beta.DeletePrincipalAcc" + + "essBoundaryPolicyRequest\032\035.google.longru" + + "nning.Operation\"\210\001\312A*\n\025google.protobuf.E" + + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\002N*L/v" + + "3beta/{name=organizations/*/locations/*/" + + "principalAccessBoundaryPolicies/*}\022\203\002\n#L" + + "istPrincipalAccessBoundaryPolicies\022=.goo" + + "gle.iam.v3beta.ListPrincipalAccessBounda" + + "ryPoliciesRequest\032>.google.iam.v3beta.Li" + + "stPrincipalAccessBoundaryPoliciesRespons" + + "e\"]\332A\006parent\202\323\344\223\002N\022L/v3beta/{parent=orga" + + "nizations/*/locations/*}/principalAccess" + + "BoundaryPolicies\022\256\002\n+SearchPrincipalAcce" + + "ssBoundaryPolicyBindings\022E.google.iam.v3" + + "beta.SearchPrincipalAccessBoundaryPolicy" + + "BindingsRequest\032F.google.iam.v3beta.Sear" + + "chPrincipalAccessBoundaryPolicyBindingsR" + + "esponse\"p\332A\004name\202\323\344\223\002c\022a/v3beta/{name=or" + + "ganizations/*/locations/*/principalAcces" + + "sBoundaryPolicies/*}:searchPolicyBinding" + + "s\032F\312A\022iam.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platformB\251\001\n\025co" + + "m.google.iam.v3betaB+PrincipalAccessBoun" + + "daryPoliciesServiceProtoP\001Z-cloud.google" + + ".com/go/iam/apiv3beta/iampb;iampb\252\002\027Goog" + + "le.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V" + + "3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(), + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(), + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", + "PrincipalAccessBoundaryPolicyId", + "PrincipalAccessBoundaryPolicy", + "ValidateOnly", + }); + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicy", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", "Force", + }); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicies", "NextPageToken", + }); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Name", "PageSize", "PageToken", + }); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(); + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(); + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..5ce805dc04df --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java @@ -0,0 +1,2544 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * An IAM principal access boundary policy resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicy} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + PrincipalAccessBoundaryPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicy"); + } + + // Use PrincipalAccessBoundaryPolicy.newBuilder() to construct. + private PrincipalAccessBoundaryPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicy() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DETAILS_FIELD_NUMBER = 8; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details_; + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails() { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder() { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDetails()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicy)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An IAM principal access boundary policy resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.details_ = detailsBuilder_ == null ? details_ : detailsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicy) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(internalGetDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + detailsBuilder_; + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails() { + if (detailsBuilder_ == null) { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + } else { + detailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDetails(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && details_ != null + && details_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails + .getDefaultInstance()) { + getDetailsBuilder().mergeFrom(value); + } else { + details_ = value; + } + } else { + detailsBuilder_.mergeFrom(value); + } + if (details_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000080); + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder getDetailsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDetailsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder + getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + internalGetDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder>( + getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicy(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java new file mode 100644 index 000000000000..36b99f2670f0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java @@ -0,0 +1,1225 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Principal access boundary policy details
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyDetails extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + PrincipalAccessBoundaryPolicyDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyDetails"); + } + + // Use PrincipalAccessBoundaryPolicyDetails.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyDetails( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyDetails() { + rules_ = java.util.Collections.emptyList(); + enforcementVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index) { + return rules_.get(index); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int ENFORCEMENT_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + @java.lang.Override + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enforcementVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enforcementVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, enforcementVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enforcementVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, enforcementVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) obj; + + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getEnforcementVersion().equals(other.getEnforcementVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + ENFORCEMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getEnforcementVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Principal access boundary policy details
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + enforcementVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enforcementVersion_ = enforcementVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance()) + return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getEnforcementVersion().isEmpty()) { + enforcementVersion_ = other.enforcementVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule m = + input.readMessage( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.parser(), + extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + case 34: + { + enforcementVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = + new java.util.ArrayList( + rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRules( + java.lang.Iterable + values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder getRulesBuilder( + int index) { + return internalGetRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder() { + return internalGetRulesFieldBuilder() + .addBuilder(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder( + int index) { + return internalGetRulesFieldBuilder() + .addBuilder( + index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRulesBuilderList() { + return internalGetRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + internalGetRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enforcementVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnforcementVersion() { + enforcementVersion_ = getDefaultInstance().getEnforcementVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java new file mode 100644 index 000000000000..4cc78485f364 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRulesList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRulesCount(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRulesOrBuilderList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + java.lang.String getEnforcementVersion(); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + com.google.protobuf.ByteString getEnforcementVersionBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java new file mode 100644 index 000000000000..313e6422fabb --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java @@ -0,0 +1,243 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPolicyName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + private final String principalAccessBoundaryPolicy; + + @Deprecated + protected PrincipalAccessBoundaryPolicyName() { + organization = null; + location = null; + principalAccessBoundaryPolicy = null; + } + + private PrincipalAccessBoundaryPolicyName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + principalAccessBoundaryPolicy = + Preconditions.checkNotNull(builder.getPrincipalAccessBoundaryPolicy()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PrincipalAccessBoundaryPolicyName of( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build(); + } + + public static String format( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build() + .toString(); + } + + public static PrincipalAccessBoundaryPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.validatedMatch( + formattedString, + "PrincipalAccessBoundaryPolicyName.parse: formattedString not in valid format"); + return of( + matchMap.get("organization"), + matchMap.get("location"), + matchMap.get("principal_access_boundary_policy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PrincipalAccessBoundaryPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (principalAccessBoundaryPolicy != null) { + fieldMapBuilder.put("principal_access_boundary_policy", principalAccessBoundaryPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.instantiate( + "organization", + organization, + "location", + location, + "principal_access_boundary_policy", + principalAccessBoundaryPolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PrincipalAccessBoundaryPolicyName that = ((PrincipalAccessBoundaryPolicyName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.principalAccessBoundaryPolicy, that.principalAccessBoundaryPolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(principalAccessBoundaryPolicy); + return h; + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}. + */ + public static class Builder { + private String organization; + private String location; + private String principalAccessBoundaryPolicy; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPrincipalAccessBoundaryPolicy(String principalAccessBoundaryPolicy) { + this.principalAccessBoundaryPolicy = principalAccessBoundaryPolicy; + return this; + } + + private Builder(PrincipalAccessBoundaryPolicyName principalAccessBoundaryPolicyName) { + this.organization = principalAccessBoundaryPolicyName.organization; + this.location = principalAccessBoundaryPolicyName.location; + this.principalAccessBoundaryPolicy = + principalAccessBoundaryPolicyName.principalAccessBoundaryPolicy; + } + + public PrincipalAccessBoundaryPolicyName build() { + return new PrincipalAccessBoundaryPolicyName(this); + } + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java new file mode 100644 index 000000000000..b8a5c9beed7c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java @@ -0,0 +1,355 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + boolean hasDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java new file mode 100644 index 000000000000..991084259dc0 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyResourcesProto + extends com.google.protobuf.GeneratedFile { + private PrincipalAccessBoundaryPolicyResourcesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyResourcesProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "Bgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\022\021google.iam" + + ".v3beta\032\037google/api/field_behavior.proto" + + "\032\033google/api/field_info.proto\032\031google/ap" + + "i/resource.proto\032\037google/protobuf/timestamp.proto\"\265\005\n" + + "\035PrincipalAccessBoundaryPolicy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022[\n" + + "\013annotations\030\005 \003(\0132A.go" + + "ogle.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\003\340A\001\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n" + + "\007details\030\010 \001(\01327.googl" + + "e.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\003\340A\001\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\354\001\352A\350\001\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPol" + + "icy\022torganizations/{organization}/locations/{location}/principalAccessBoundaryPo" + + "licies/{principal_access_boundary_policy" + + "}*\037principalAccessBoundaryPolicies2\035principalAccessBoundaryPolicy\"\222\001\n" + + "$PrincipalAccessBoundaryPolicyDetails\022H\n" + + "\005rules\030\001 \003(" + + "\01324.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\003\340A\002\022 \n" + + "\023enforcement_version\030\004 \001(\tB\003\340A\001\"\324\001\n" + + "!PrincipalAccessBoundaryPolicyRule\022\030\n" + + "\013description\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tresources\030\002 \003(\tB\003\340A\002\022P\n" + + "\006effect\030\003 \001(\0162;" + + ".google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\003\340A\002\"+\n" + + "\006Effect\022\026\n" + + "\022EFFECT_UNSPECIFIED\020\000\022\t\n" + + "\005ALLOW\020\001B\251\001\n" + + "\025com.google.iam.v3betaB+PrincipalAccessBoundary" + + "PolicyResourcesProtoP\001Z-cloud.google.com" + + "/go/iam/apiv3beta/iampb;iampb\252\002\027Google.C" + + "loud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "CreateTime", + "UpdateTime", + "Details", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor = + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor.getNestedType(0); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor, + new java.lang.String[] { + "Rules", "EnforcementVersion", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor, + new java.lang.String[] { + "Description", "Resources", "Effect", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java new file mode 100644 index 000000000000..7c39a4386fbf --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Principal access boundary policy rule that defines the resource boundary.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule} + */ +@com.google.protobuf.Generated +public final class PrincipalAccessBoundaryPolicyRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + PrincipalAccessBoundaryPolicyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrincipalAccessBoundaryPolicyRule"); + } + + // Use PrincipalAccessBoundaryPolicyRule.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyRule( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyRule() { + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + /** + * + * + *
+   * An effect to describe the access relationship.
+   * 
+ * + * Protobuf enum {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect} + */ + public enum Effect implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + EFFECT_UNSPECIFIED(0), + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + ALLOW(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Effect"); + } + + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + public static final int EFFECT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + public static final int ALLOW_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Effect valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Effect forNumber(int value) { + switch (value) { + case 0: + return EFFECT_UNSPECIFIED; + case 1: + return ALLOW; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Effect findValueByNumber(int number) { + return Effect.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Effect[] VALUES = values(); + + public static Effect valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Effect(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect) + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_; + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + public static final int EFFECT_FIELD_NUMBER = 3; + private int effect_ = 0; + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + for (int i = 0; i < resources_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resources_.getRaw(i)); + } + if (effect_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, effect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + { + int dataSize = 0; + for (int i = 0; i < resources_.size(); i++) { + dataSize += computeStringSizeNoTag(resources_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcesList().size(); + } + if (effect_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, effect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (effect_ != other.effect_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + hash = (37 * hash) + EFFECT_FIELD_NUMBER; + hash = (53 * hash) + effect_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Principal access boundary policy rule that defines the resource boundary.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + resources_.makeImmutable(); + result.resources_ = resources_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.effect_ = effect_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ |= 0x00000002; + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + if (other.effect_ != 0) { + setEffectValue(other.getEffectValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcesIsMutable(); + resources_.add(s); + break; + } // case 18 + case 24: + { + effect_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourcesIsMutable() { + if (!resources_.isModifiable()) { + resources_ = new com.google.protobuf.LazyStringArrayList(resources_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + resources_.makeImmutable(); + return resources_; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The resources to set. + * @return This builder for chaining. + */ + public Builder setResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resources to add. + * @return This builder for chaining. + */ + public Builder addResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The resources to add. + * @return This builder for chaining. + */ + public Builder addAllResources(java.lang.Iterable values) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResources() { + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the resources to add. + * @return This builder for chaining. + */ + public Builder addResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int effect_ = 0; + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for effect to set. + * @return This builder for chaining. + */ + public Builder setEffectValue(int value) { + effect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The effect to set. + * @return This builder for chaining. + */ + public Builder setEffect(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + effect_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffect() { + bitField0_ = (bitField0_ & ~0x00000004); + effect_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java new file mode 100644 index 000000000000..5de0aa3fcb38 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policy_resources.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface PrincipalAccessBoundaryPolicyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + java.util.List getResourcesList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + int getResourcesCount(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + java.lang.String getResources(int index); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   * or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + com.google.protobuf.ByteString getResourcesBytes(int index); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + int getEffectValue(); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java new file mode 100644 index 000000000000..5fe43e194927 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java @@ -0,0 +1,993 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class SearchPrincipalAccessBoundaryPolicyBindingsRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchPrincipalAccessBoundaryPolicyBindingsRequest"); + } + + // Use SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsRequest() { + name_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest other = + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder + .class); + } + + // Construct using + // com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest build() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) { + return mergeFrom( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest other) { + if (other + == com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + private static final com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..3caf78ba81f1 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java new file mode 100644 index 000000000000..b9a787d7ab9f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class SearchPrincipalAccessBoundaryPolicyBindingsResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchPrincipalAccessBoundaryPolicyBindingsResponse"); + } + + // Use SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder + .class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse other = + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder + .class); + } + + // Construct using + // com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse build() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + buildPartial() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + return mergeFrom( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse other) { + if (other + == com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance()) return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + private static final com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..e466539c768d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java new file mode 100644 index 000000000000..c520c8c5e99c --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java @@ -0,0 +1,1271 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class SearchTargetPolicyBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + SearchTargetPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchTargetPolicyBindingsRequest"); + } + + // Use SearchTargetPolicyBindingsRequest.newBuilder() to construct. + private SearchTargetPolicyBindingsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsRequest() { + target_ = ""; + pageToken_ = ""; + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.Builder.class); + } + + public static final int TARGET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.SearchTargetPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest other = + (com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) obj; + + if (!getTarget().equals(other.getTarget())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + com.google.iam.v3beta.SearchTargetPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = ""; + pageSize_ = 0; + pageToken_ = ""; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest build() { + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result = + new com.google.iam.v3beta.SearchTargetPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.SearchTargetPolicyBindingsRequest other) { + if (other == com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.getDefaultInstance()) + return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + private static final com.google.iam.v3beta.SearchTargetPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.SearchTargetPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..94b017218e61 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface SearchTargetPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java new file mode 100644 index 000000000000..0383e40f9e8f --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class SearchTargetPolicyBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + SearchTargetPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchTargetPolicyBindingsResponse"); + } + + // Use SearchTargetPolicyBindingsResponse.newBuilder() to construct. + private SearchTargetPolicyBindingsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.SearchTargetPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse other = + (com.google.iam.v3beta.SearchTargetPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + com.google.iam.v3beta.SearchTargetPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse build() { + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse buildPartial() { + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result = + new com.google.iam.v3beta.SearchTargetPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.SearchTargetPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3beta.SearchTargetPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.SearchTargetPolicyBindingsResponse other) { + if (other == com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.getDefaultInstance()) + return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return internalGetPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return internalGetPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + internalGetPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + private static final com.google.iam.v3beta.SearchTargetPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.SearchTargetPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..364972990775 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface SearchTargetPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java new file mode 100644 index 000000000000..a106dd0fab7a --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for UpdatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePolicyBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.UpdatePolicyBindingRequest) + UpdatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePolicyBindingRequest"); + } + + // Use UpdatePolicyBindingRequest.newBuilder() to construct. + private UpdatePolicyBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePolicyBindingRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + com.google.iam.v3beta.UpdatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int POLICY_BINDING_FIELD_NUMBER = 1; + private com.google.iam.v3beta.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.UpdatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.UpdatePolicyBindingRequest other = + (com.google.iam.v3beta.UpdatePolicyBindingRequest) obj; + + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.iam.v3beta.UpdatePolicyBindingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.UpdatePolicyBindingRequest) + com.google.iam.v3beta.UpdatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + com.google.iam.v3beta.UpdatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.UpdatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyBindingFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.UpdatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest build() { + com.google.iam.v3beta.UpdatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.UpdatePolicyBindingRequest result = + new com.google.iam.v3beta.UpdatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.UpdatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.UpdatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.UpdatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.UpdatePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.UpdatePolicyBindingRequest.getDefaultInstance()) + return this; + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3beta.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000001); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + internalGetPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.UpdatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.UpdatePolicyBindingRequest) + private static final com.google.iam.v3beta.UpdatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.UpdatePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..6c567d1609a7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/policy_bindings_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface UpdatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.UpdatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3beta.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 000000000000..0d1e19d43efa --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1175 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest} + */ +@com.google.protobuf.Generated +public final class UpdatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdatePrincipalAccessBoundaryPolicyRequest"); + } + + // Use UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private UpdatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdatePrincipalAccessBoundaryPolicyRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 1; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) obj; + + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPrincipalAccessBoundaryPolicyFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + internalGetPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..a22cfca2beda --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/iam/v3beta/principal_access_boundary_policies_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.iam.v3beta; + +@com.google.protobuf.Generated +public interface UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto new file mode 100644 index 000000000000..6c6225209362 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto @@ -0,0 +1,57 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "OperationMetadataProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto new file mode 100644 index 000000000000..1fed6cfcefe7 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto @@ -0,0 +1,185 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingResourcesProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// IAM policy binding resource. +message PolicyBinding { + option (google.api.resource) = { + type: "iam.googleapis.com/PolicyBinding" + pattern: "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}" + pattern: "folders/{folder}/locations/{location}/policyBindings/{policy_binding}" + pattern: "projects/{project}/locations/{location}/policyBindings/{policy_binding}" + plural: "policyBindings" + singular: "policyBinding" + }; + + // Target is the full resource name of the resource to which the policy will + // be bound. Immutable once set. + message Target { + // The different types of targets that can be bound to a policy. + oneof target { + // Immutable. Full Resource Name used for principal access boundary policy + // bindings. The principal set must be directly parented by the policy + // binding's parent or same as the parent if the target is a + // project/folder/organization. + // + // Examples: + // * For binding's parented by an organization: + // * Organization: + // `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + // * Workforce Identity: + // `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + // * Workspace Identity: + // `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * For binding's parented by a folder: + // * Folder: + // `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + // * For binding's parented by a project: + // * Project: + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + // * Workload Identity Pool: + // `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + string principal_set = 1 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Different policy kinds supported in this binding. + enum PolicyKind { + // Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0; + + // Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1; + } + + // Identifier. The name of the policy binding, in the format + // `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + // The binding parent is the closest Resource Manager resource (project, + // folder, or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the policy binding. Assigned when + // the policy binding is created. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the policy binding. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the policy binding. Must be less than or equal + // to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. Target is the full resource name of the resource to + // which the policy will be bound. Immutable once set. + Target target = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Immutable. The kind of the policy to attach in this binding. This field + // must be one of the following: + // + // - Left empty (will be automatically set to the policy kind) + // - The input policy kind + PolicyKind policy_kind = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. The resource name of the policy to be bound. The + // binding parent and policy must belong to the same organization. + string policy = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The globally unique ID of the policy to be bound. + string policy_uid = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The condition to apply to the policy binding. When set, the + // `expression` field in the `Expr` must include from 1 to 10 subexpressions, + // joined by the + // "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + // cannot contain more than 250 characters. + // + // The condition is currently only supported when bound to policies of kind + // principal access boundary. + // + // When the bound policy is a principal access boundary policy, the only + // supported attributes in any subexpression are `principal.type` and + // `principal.subject`. An example expression is: "principal.type == + // 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + // 'bob@example.com'". + // + // Allowed operations for `principal.subject`: + // + // - `principal.subject == ` + // - `principal.subject != ` + // - `principal.subject in []` + // - `principal.subject.startsWith()` + // - `principal.subject.endsWith()` + // + // Allowed operations for `principal.type`: + // + // - `principal.type == ` + // - `principal.type != ` + // - `principal.type in []` + // + // Supported principal types are Workspace, Workforce Pool, Workload Pool and + // Service Account. Allowed string must be one of: + // + // - iam.googleapis.com/WorkspaceIdentity + // - iam.googleapis.com/WorkforcePoolIdentity + // - iam.googleapis.com/WorkloadPoolIdentity + // - iam.googleapis.com/ServiceAccount + google.type.Expr condition = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the policy binding was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the policy binding was most recently updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto new file mode 100644 index 000000000000..e4f7c854472d --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto @@ -0,0 +1,377 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3beta/operation_metadata.proto"; +import "google/iam/v3beta/policy_binding_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingsServiceProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// An interface for managing Identity and Access Management (IAM) policy +// bindings. +service PolicyBindings { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is created, the policy is applied to the target. + rpc CreatePolicyBinding(CreatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta/{parent=projects/*/locations/*}/policyBindings" + body: "policy_binding" + additional_bindings { + post: "/v3beta/{parent=folders/*/locations/*}/policyBindings" + body: "policy_binding" + } + additional_bindings { + post: "/v3beta/{parent=organizations/*/locations/*}/policyBindings" + body: "policy_binding" + } + }; + option (google.api.method_signature) = + "parent,policy_binding,policy_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Gets a policy binding. + rpc GetPolicyBinding(GetPolicyBindingRequest) returns (PolicyBinding) { + option (google.api.http) = { + get: "/v3beta/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + get: "/v3beta/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + get: "/v3beta/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on the policy and target in the + // binding to update, and the IAM permission to remove the existing policy + // from the binding. Target is immutable and cannot be updated. Once the + // binding is updated, the new policy is applied to the target. + rpc UpdatePolicyBinding(UpdatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}" + body: "policy_binding" + additional_bindings { + patch: "/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + additional_bindings { + patch: "/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + }; + option (google.api.method_signature) = "policy_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is deleted, the policy no longer applies to the target. + rpc DeletePolicyBinding(DeletePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3beta/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + delete: "/v3beta/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + delete: "/v3beta/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists policy bindings. + rpc ListPolicyBindings(ListPolicyBindingsRequest) + returns (ListPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=projects/*/locations/*}/policyBindings" + additional_bindings { + get: "/v3beta/{parent=folders/*/locations/*}/policyBindings" + } + additional_bindings { + get: "/v3beta/{parent=organizations/*/locations/*}/policyBindings" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Search policy bindings by target. Returns all policy binding objects bound + // directly to target. + rpc SearchTargetPolicyBindings(SearchTargetPolicyBindingsRequest) + returns (SearchTargetPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindings" + additional_bindings { + get: "/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + additional_bindings { + get: "/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + }; + option (google.api.method_signature) = "parent,target"; + } +} + +// Request message for CreatePolicyBinding method. +message CreatePolicyBindingRequest { + // Required. The parent resource where this policy binding will be created. + // The binding parent is the closest Resource Manager resource (project, + // folder or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Required. The ID to use for the policy binding, which will become the final + // component of the policy binding's resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string policy_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The policy binding to create. + PolicyBinding policy_binding = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPolicyBinding method. +message GetPolicyBindingRequest { + // Required. The name of the policy binding to retrieve. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Request message for UpdatePolicyBinding method. +message UpdatePolicyBindingRequest { + // Required. The policy binding to update. + // + // The policy binding's `name` field is used to identify the policy binding to + // update. + PolicyBinding policy_binding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePolicyBinding method. +message DeletePolicyBindingRequest { + // Required. The name of the policy binding to delete. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The etag of the policy binding. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPolicyBindings method. +message ListPolicyBindingsRequest { + // Required. The parent resource, which owns the collection of policy + // bindings. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListPolicyBindings` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListPolicyBindings` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. Some eligible fields for filtering are: + // + // + `target` + // + `policy` + // + // Some examples of filter queries: + // + // * `target:ex*`: The binding target's name starts with "ex". + // * `target:example`: The binding target's name is `example`. + // * `policy:example`: The binding policy's name is `example`. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPolicyBindings method. +message ListPolicyBindingsResponse { + // The policy bindings from the specified parent. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsRequest { + // Required. The target resource, which is bound to the policy in the binding. + // + // Format: + // + // * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + // * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + // * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + // * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + // * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + string target = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `SearchTargetPolicyBindingsRequest` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The parent resource where this search will be performed. This + // should be the nearest Resource Manager resource (project, folder, or + // organization) to the target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Response message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsResponse { + // The policy bindings bound to the specified target. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto new file mode 100644 index 000000000000..fd3817c33805 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto @@ -0,0 +1,292 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3beta/operation_metadata.proto"; +import "google/iam/v3beta/policy_binding_resources.proto"; +import "google/iam/v3beta/principal_access_boundary_policy_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPoliciesServiceProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// Manages Identity and Access Management (IAM) principal access boundary +// policies. +service PrincipalAccessBoundaryPolicies { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a principal access boundary policy, and returns a long running + // operation. + rpc CreatePrincipalAccessBoundaryPolicy( + CreatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "parent,principal_access_boundary_policy,principal_access_boundary_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Gets a principal access boundary policy. + rpc GetPrincipalAccessBoundaryPolicy(GetPrincipalAccessBoundaryPolicyRequest) + returns (PrincipalAccessBoundaryPolicy) { + option (google.api.http) = { + get: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a principal access boundary policy. + rpc UpdatePrincipalAccessBoundaryPolicy( + UpdatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "principal_access_boundary_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a principal access boundary policy. + rpc DeletePrincipalAccessBoundaryPolicy( + DeletePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists principal access boundary policies. + rpc ListPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest) + returns (ListPrincipalAccessBoundaryPoliciesResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns all policy bindings that bind a specific policy if a user has + // searchPolicyBindings permission on that policy. + rpc SearchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest) + returns (SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for CreatePrincipalAccessBoundaryPolicyRequest method. +message CreatePrincipalAccessBoundaryPolicyRequest { + // Required. The parent resource where this principal access boundary policy + // will be created. Only organizations are supported. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Required. The ID to use for the principal access boundary policy, which + // will become the final component of the principal access boundary policy's + // resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string principal_access_boundary_policy_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The principal access boundary policy to create. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPrincipalAccessBoundaryPolicy method. +message GetPrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to retrieve. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; +} + +// Request message for UpdatePrincipalAccessBoundaryPolicy method. +message UpdatePrincipalAccessBoundaryPolicyRequest { + // Required. The principal access boundary policy to update. + // + // The principal access boundary policy's `name` field is used to identify the + // policy to update. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePrincipalAccessBoundaryPolicy method. +message DeletePrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to delete. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The etag of the principal access boundary policy. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request will force the deletion of the policy + // even if the policy is referenced in policy bindings. + bool force = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesRequest { + // Required. The parent resource, which owns the collection of principal + // access boundary policies. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of principal access boundary policies to + // return. The service may return fewer than this value. + // + // If unspecified, at most 50 principal access boundary policies will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesResponse { + // The principal access boundary policies from the specified parent. + repeated PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsRequest { + // Required. The name of the principal access boundary policy. + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + // retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + // that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsResponse { + // The policy bindings that reference the specified policy. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto new file mode 100644 index 000000000000..738e0cc05c13 --- /dev/null +++ b/java-common-iam/proto-proto-google-iam-v1-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto @@ -0,0 +1,128 @@ +// Copyright 2025 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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPolicyResourcesProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// An IAM principal access boundary policy resource. +message PrincipalAccessBoundaryPolicy { + option (google.api.resource) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + pattern: "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}" + plural: "principalAccessBoundaryPolicies" + singular: "principalAccessBoundaryPolicy" + }; + + // Identifier. The resource name of the principal access boundary policy. + // + // The following format is supported: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the principal access boundary + // policy. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the principal access boundary. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the principal access boundary policy. Must be + // less than or equal to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the principal access boundary policy was + // created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the principal access boundary policy was most + // recently updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The details for the principal access boundary policy. + PrincipalAccessBoundaryPolicyDetails details = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy details +message PrincipalAccessBoundaryPolicyDetails { + // Required. A list of principal access boundary policy rules. The number of + // rules in a policy is limited to 500. + repeated PrincipalAccessBoundaryPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. + // The version number (for example, `1` or `latest`) that indicates which + // permissions are able to be blocked by the policy. If empty, the PAB policy + // version will be set to the most recent version number at the time of the + // policy's creation. + string enforcement_version = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy rule that defines the resource boundary. +message PrincipalAccessBoundaryPolicyRule { + // An effect to describe the access relationship. + enum Effect { + // Effect unspecified. + EFFECT_UNSPECIFIED = 0; + + // Allows access to the resources in this rule. + ALLOW = 1; + } + + // Optional. The description of the principal access boundary policy rule. + // Must be less than or equal to 256 characters. + string description = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A list of Resource Manager resources. If a resource is listed in + // the rule, then the rule applies for that resource and its descendants. The + // number of resources in a policy is limited to 500 across all rules in the + // policy. + // + // The following resource types are supported: + // + // * Organizations, such as + // `//cloudresourcemanager.googleapis.com/organizations/123`. + // * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + // * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + // or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + repeated string resources = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The access relationship of principals to the resources in this + // rule. + Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d974b4686ba3 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.PoliciesSettings; +import com.google.iam.v2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = + PoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2_generated_Policies_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..54a3eb9e03b3 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_Create_SetEndpoint_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.PoliciesSettings; +import com.google.iam.v2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = + PoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2_generated_Policies_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..0636ecfe43da --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_Create_UseHttpJsonTransport_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.PoliciesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = PoliciesSettings.newHttpJsonBuilder().build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2_generated_Policies_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicy.java new file mode 100644 index 000000000000..b0184cce7791 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_CreatePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.longrunning.Operation; + +public class AsyncCreatePolicy { + + public static void main(String[] args) throws Exception { + asyncCreatePolicy(); + } + + public static void asyncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + ApiFuture future = policiesClient.createPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_CreatePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicyLRO.java new file mode 100644 index 000000000000..35b5ac5b9856 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/AsyncCreatePolicyLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_CreatePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; + +public class AsyncCreatePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyLRO(); + } + + public static void asyncCreatePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + OperationFuture future = + policiesClient.createPolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_CreatePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..9239f3572fa1 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_CreatePolicy_sync] +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + Policy response = policiesClient.createPolicyAsync(request).get(); + } + } +} +// [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicyStringPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicyStringPolicyString.java new file mode 100644 index 000000000000..ee4022963291 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/createpolicy/SyncCreatePolicyStringPolicyString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_CreatePolicy_StringPolicyString_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncCreatePolicyStringPolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyStringPolicyString(); + } + + public static void syncCreatePolicyStringPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + Policy response = policiesClient.createPolicyAsync(parent, policy, policyId).get(); + } + } +} +// [END iam_v2_generated_Policies_CreatePolicy_StringPolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicy.java new file mode 100644 index 000000000000..301060940a3f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_DeletePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePolicy { + + public static void main(String[] args) throws Exception { + asyncDeletePolicy(); + } + + public static void asyncDeletePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + ApiFuture future = policiesClient.deletePolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_DeletePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicyLRO.java new file mode 100644 index 000000000000..9f700d07f2cd --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/AsyncDeletePolicyLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_DeletePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; + +public class AsyncDeletePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyLRO(); + } + + public static void asyncDeletePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + OperationFuture future = + policiesClient.deletePolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_DeletePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicy.java new file mode 100644 index 000000000000..2b9606190401 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_DeletePolicy_sync] +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncDeletePolicy { + + public static void main(String[] args) throws Exception { + syncDeletePolicy(); + } + + public static void syncDeletePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + Policy response = policiesClient.deletePolicyAsync(request).get(); + } + } +} +// [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicyString.java new file mode 100644 index 000000000000..e5209747c21d --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/deletepolicy/SyncDeletePolicyString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_DeletePolicy_String_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncDeletePolicyString { + + public static void main(String[] args) throws Exception { + syncDeletePolicyString(); + } + + public static void syncDeletePolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String name = "name3373707"; + Policy response = policiesClient.deletePolicyAsync(name).get(); + } + } +} +// [END iam_v2_generated_Policies_DeletePolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/AsyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/AsyncGetPolicy.java new file mode 100644 index 000000000000..7f1ddea89544 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/AsyncGetPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_GetPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class AsyncGetPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPolicy(); + } + + public static void asyncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = policiesClient.getPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_GetPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..c4e6b45d19ff --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicy.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_GetPolicy_sync] +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); + Policy response = policiesClient.getPolicy(request); + } + } +} +// [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicyString.java new file mode 100644 index 000000000000..1bd2f43e41f0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/getpolicy/SyncGetPolicyString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_GetPolicy_String_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncGetPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPolicyString(); + } + + public static void syncGetPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String name = "name3373707"; + Policy response = policiesClient.getPolicy(name); + } + } +} +// [END iam_v2_generated_Policies_GetPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPolicies.java new file mode 100644 index 000000000000..b8ae35356302 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPolicies.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_ListPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class AsyncListPolicies { + + public static void main(String[] args) throws Exception { + asyncListPolicies(); + } + + public static void asyncListPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = policiesClient.listPoliciesPagedCallable().futureCall(request); + // Do something. + for (Policy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2_generated_Policies_ListPolicies_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPoliciesPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPoliciesPaged.java new file mode 100644 index 000000000000..ae3ae8295756 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/AsyncListPoliciesPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_ListPolicies_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.ListPoliciesResponse; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class AsyncListPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListPoliciesPaged(); + } + + public static void asyncListPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPoliciesResponse response = policiesClient.listPoliciesCallable().call(request); + for (Policy element : response.getPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v2_generated_Policies_ListPolicies_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPolicies.java new file mode 100644 index 000000000000..b3ffa2952963 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPolicies.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_ListPolicies_sync] +import com.google.iam.v2.ListPoliciesRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncListPolicies { + + public static void main(String[] args) throws Exception { + syncListPolicies(); + } + + public static void syncListPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Policy element : policiesClient.listPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPoliciesString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPoliciesString.java new file mode 100644 index 000000000000..1367f91970b7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/listpolicies/SyncListPoliciesString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_ListPolicies_String_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; + +public class SyncListPoliciesString { + + public static void main(String[] args) throws Exception { + syncListPoliciesString(); + } + + public static void syncListPoliciesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String parent = "parent-995424086"; + for (Policy element : policiesClient.listPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2_generated_Policies_ListPolicies_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicy.java new file mode 100644 index 000000000000..6a87ec298c9e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_UpdatePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.UpdatePolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicy(); + } + + public static void asyncUpdatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + ApiFuture future = policiesClient.updatePolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_UpdatePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicyLRO.java new file mode 100644 index 000000000000..f680d7227453 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/AsyncUpdatePolicyLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_UpdatePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyOperationMetadata; +import com.google.iam.v2.UpdatePolicyRequest; + +public class AsyncUpdatePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyLRO(); + } + + public static void asyncUpdatePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + OperationFuture future = + policiesClient.updatePolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2_generated_Policies_UpdatePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/SyncUpdatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/SyncUpdatePolicy.java new file mode 100644 index 000000000000..94df8ea8faaf --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policies/updatepolicy/SyncUpdatePolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_Policies_UpdatePolicy_sync] +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.UpdatePolicyRequest; + +public class SyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicy(); + } + + public static void syncUpdatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + Policy response = policiesClient.updatePolicyAsync(request).get(); + } + } +} +// [END iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..16df05b20384 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_PoliciesSettings_CreatePolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v2.PoliciesSettings; +import java.time.Duration; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policiesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v2_generated_PoliciesSettings_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..a19ce7ddcaed --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/policiessettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.samples; + +// [START iam_v2_generated_PoliciesSettings_GetPolicy_sync] +import com.google.iam.v2.PoliciesSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder(); + policiesSettingsBuilder + .getPolicySettings() + .setRetrySettings( + policiesSettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PoliciesSettings policiesSettings = policiesSettingsBuilder.build(); + } +} +// [END iam_v2_generated_PoliciesSettings_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..c9340a7c62cc --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub.samples; + +// [START iam_v2_generated_PoliciesStubSettings_CreatePolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v2.stub.PoliciesStubSettings; +import java.time.Duration; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policiesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v2_generated_PoliciesStubSettings_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..1c9187dd9209 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2.stub.samples; + +// [START iam_v2_generated_PoliciesStubSettings_GetPolicy_sync] +import com.google.iam.v2.stub.PoliciesStubSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder(); + policiesSettingsBuilder + .getPolicySettings() + .setRetrySettings( + policiesSettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PoliciesStubSettings policiesSettings = policiesSettingsBuilder.build(); + } +} +// [END iam_v2_generated_PoliciesStubSettings_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f616d5686f72 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.PoliciesSettings; +import com.google.iam.v2beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = + PoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2beta_generated_Policies_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..bcc354b54665 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_Create_SetEndpoint_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.PoliciesSettings; +import com.google.iam.v2beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = + PoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2beta_generated_Policies_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..4ed1d4998651 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_Create_UseHttpJsonTransport_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.PoliciesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings policiesSettings = PoliciesSettings.newHttpJsonBuilder().build(); + PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); + } +} +// [END iam_v2beta_generated_Policies_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicy.java new file mode 100644 index 000000000000..92c73343d8da --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_CreatePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.longrunning.Operation; + +public class AsyncCreatePolicy { + + public static void main(String[] args) throws Exception { + asyncCreatePolicy(); + } + + public static void asyncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + ApiFuture future = policiesClient.createPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_CreatePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicyLRO.java new file mode 100644 index 000000000000..690be177ce8e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/AsyncCreatePolicyLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_CreatePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; + +public class AsyncCreatePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyLRO(); + } + + public static void asyncCreatePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + OperationFuture future = + policiesClient.createPolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_CreatePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..b63a2e0fe347 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_CreatePolicy_sync] +import com.google.iam.v2beta.CreatePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + CreatePolicyRequest request = + CreatePolicyRequest.newBuilder() + .setParent("parent-995424086") + .setPolicy(Policy.newBuilder().build()) + .setPolicyId("policyId546908653") + .build(); + Policy response = policiesClient.createPolicyAsync(request).get(); + } + } +} +// [END iam_v2beta_generated_Policies_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicyStringPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicyStringPolicyString.java new file mode 100644 index 000000000000..f27f222315f9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/createpolicy/SyncCreatePolicyStringPolicyString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_CreatePolicy_StringPolicyString_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncCreatePolicyStringPolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyStringPolicyString(); + } + + public static void syncCreatePolicyStringPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String parent = "parent-995424086"; + Policy policy = Policy.newBuilder().build(); + String policyId = "policyId546908653"; + Policy response = policiesClient.createPolicyAsync(parent, policy, policyId).get(); + } + } +} +// [END iam_v2beta_generated_Policies_CreatePolicy_StringPolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicy.java new file mode 100644 index 000000000000..5ed2f0ec91e0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_DeletePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePolicy { + + public static void main(String[] args) throws Exception { + asyncDeletePolicy(); + } + + public static void asyncDeletePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + ApiFuture future = policiesClient.deletePolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_DeletePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicyLRO.java new file mode 100644 index 000000000000..1b3f99baadb2 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/AsyncDeletePolicyLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_DeletePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; + +public class AsyncDeletePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyLRO(); + } + + public static void asyncDeletePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + OperationFuture future = + policiesClient.deletePolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_DeletePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicy.java new file mode 100644 index 000000000000..b70ae25d8d5f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_DeletePolicy_sync] +import com.google.iam.v2beta.DeletePolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncDeletePolicy { + + public static void main(String[] args) throws Exception { + syncDeletePolicy(); + } + + public static void syncDeletePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + DeletePolicyRequest request = + DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); + Policy response = policiesClient.deletePolicyAsync(request).get(); + } + } +} +// [END iam_v2beta_generated_Policies_DeletePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicyString.java new file mode 100644 index 000000000000..afe934a25e89 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/deletepolicy/SyncDeletePolicyString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_DeletePolicy_String_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncDeletePolicyString { + + public static void main(String[] args) throws Exception { + syncDeletePolicyString(); + } + + public static void syncDeletePolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String name = "name3373707"; + Policy response = policiesClient.deletePolicyAsync(name).get(); + } + } +} +// [END iam_v2beta_generated_Policies_DeletePolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/AsyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/AsyncGetPolicy.java new file mode 100644 index 000000000000..3d3c2357a31c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/AsyncGetPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_GetPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class AsyncGetPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPolicy(); + } + + public static void asyncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = policiesClient.getPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_GetPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..d69db7dfd4f4 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicy.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_GetPolicy_sync] +import com.google.iam.v2beta.GetPolicyRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); + Policy response = policiesClient.getPolicy(request); + } + } +} +// [END iam_v2beta_generated_Policies_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicyString.java new file mode 100644 index 000000000000..c62a22c6dacb --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/getpolicy/SyncGetPolicyString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_GetPolicy_String_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncGetPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPolicyString(); + } + + public static void syncGetPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String name = "name3373707"; + Policy response = policiesClient.getPolicy(name); + } + } +} +// [END iam_v2beta_generated_Policies_GetPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPolicies.java new file mode 100644 index 000000000000..bbf57f8cc581 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPolicies.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_ListPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class AsyncListPolicies { + + public static void main(String[] args) throws Exception { + asyncListPolicies(); + } + + public static void asyncListPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = policiesClient.listPoliciesPagedCallable().futureCall(request); + // Do something. + for (Policy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2beta_generated_Policies_ListPolicies_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPoliciesPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPoliciesPaged.java new file mode 100644 index 000000000000..8e90daef4171 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/AsyncListPoliciesPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_ListPolicies_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.ListPoliciesResponse; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class AsyncListPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListPoliciesPaged(); + } + + public static void asyncListPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPoliciesResponse response = policiesClient.listPoliciesCallable().call(request); + for (Policy element : response.getPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v2beta_generated_Policies_ListPolicies_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPolicies.java new file mode 100644 index 000000000000..fe6df9dcc0f6 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPolicies.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_ListPolicies_sync] +import com.google.iam.v2beta.ListPoliciesRequest; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncListPolicies { + + public static void main(String[] args) throws Exception { + syncListPolicies(); + } + + public static void syncListPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + ListPoliciesRequest request = + ListPoliciesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Policy element : policiesClient.listPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2beta_generated_Policies_ListPolicies_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPoliciesString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPoliciesString.java new file mode 100644 index 000000000000..872e67642cac --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/listpolicies/SyncListPoliciesString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_ListPolicies_String_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; + +public class SyncListPoliciesString { + + public static void main(String[] args) throws Exception { + syncListPoliciesString(); + } + + public static void syncListPoliciesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + String parent = "parent-995424086"; + for (Policy element : policiesClient.listPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v2beta_generated_Policies_ListPolicies_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicy.java new file mode 100644 index 000000000000..3762e221c3fa --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_UpdatePolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicy(); + } + + public static void asyncUpdatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + ApiFuture future = policiesClient.updatePolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_UpdatePolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicyLRO.java new file mode 100644 index 000000000000..4b99b40d800e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/AsyncUpdatePolicyLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_UpdatePolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.PolicyOperationMetadata; +import com.google.iam.v2beta.UpdatePolicyRequest; + +public class AsyncUpdatePolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyLRO(); + } + + public static void asyncUpdatePolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + OperationFuture future = + policiesClient.updatePolicyOperationCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END iam_v2beta_generated_Policies_UpdatePolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/SyncUpdatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/SyncUpdatePolicy.java new file mode 100644 index 000000000000..f17c0fe89d98 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policies/updatepolicy/SyncUpdatePolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_Policies_UpdatePolicy_sync] +import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2beta.Policy; +import com.google.iam.v2beta.UpdatePolicyRequest; + +public class SyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicy(); + } + + public static void syncUpdatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PoliciesClient policiesClient = PoliciesClient.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + Policy response = policiesClient.updatePolicyAsync(request).get(); + } + } +} +// [END iam_v2beta_generated_Policies_UpdatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..83d0a6e2178c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_PoliciesSettings_CreatePolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v2beta.PoliciesSettings; +import java.time.Duration; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policiesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v2beta_generated_PoliciesSettings_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..20283a2cd773 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/policiessettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.samples; + +// [START iam_v2beta_generated_PoliciesSettings_GetPolicy_sync] +import com.google.iam.v2beta.PoliciesSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder(); + policiesSettingsBuilder + .getPolicySettings() + .setRetrySettings( + policiesSettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PoliciesSettings policiesSettings = policiesSettingsBuilder.build(); + } +} +// [END iam_v2beta_generated_PoliciesSettings_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java new file mode 100644 index 000000000000..87c643ddc06f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/createpolicy/SyncCreatePolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub.samples; + +// [START iam_v2beta_generated_PoliciesStubSettings_CreatePolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v2beta.stub.PoliciesStubSettings; +import java.time.Duration; + +public class SyncCreatePolicy { + + public static void main(String[] args) throws Exception { + syncCreatePolicy(); + } + + public static void syncCreatePolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policiesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v2beta_generated_PoliciesStubSettings_CreatePolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 000000000000..bddebb360665 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v2beta/stub/policiesstubsettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v2beta.stub.samples; + +// [START iam_v2beta_generated_PoliciesStubSettings_GetPolicy_sync] +import com.google.iam.v2beta.stub.PoliciesStubSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder(); + policiesSettingsBuilder + .getPolicySettings() + .setRetrySettings( + policiesSettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PoliciesStubSettings policiesSettings = policiesSettingsBuilder.build(); + } +} +// [END iam_v2beta_generated_PoliciesStubSettings_GetPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f51fba85ae2c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.PolicyBindingsSettings; +import com.google.iam.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3_generated_PolicyBindings_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4f0b38c3eb56 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_Create_SetEndpoint_sync] +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.PolicyBindingsSettings; +import com.google.iam.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newBuilder().setEndpoint(myEndpoint).build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3_generated_PolicyBindings_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..d86566e6fe5a --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_Create_UseHttpJsonTransport_sync] +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.PolicyBindingsSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newHttpJsonBuilder().build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3_generated_PolicyBindings_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java new file mode 100644 index 000000000000..2482679d399f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.longrunning.Operation; + +public class AsyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBinding(); + } + + public static void asyncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + policyBindingsClient.createPolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java new file mode 100644 index 000000000000..4fd623fcb005 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class AsyncCreatePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBindingLRO(); + } + + public static void asyncCreatePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + policyBindingsClient.createPolicyBindingOperationCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..fe91ac388bf6 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] +import com.google.iam.v3.CreatePolicyBindingRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + PolicyBinding response = policyBindingsClient.createPolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java new file mode 100644 index 000000000000..44d8ed54b0e6 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_FolderlocationnamePolicybindingString_sync] +import com.google.iam.v3.FolderLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncCreatePolicyBindingFolderlocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingFolderlocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingFolderlocationnamePolicybindingString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_FolderlocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java new file mode 100644 index 000000000000..deb014486e22 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_LocationnamePolicybindingString_sync] +import com.google.iam.v3.LocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncCreatePolicyBindingLocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingLocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingLocationnamePolicybindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_LocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java new file mode 100644 index 000000000000..585c0b335a51 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_OrganizationlocationnamePolicybindingString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingOrganizationlocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingOrganizationlocationnamePolicybindingString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_OrganizationlocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java new file mode 100644 index 000000000000..fb94bbd36497 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_StringPolicybindingString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncCreatePolicyBindingStringPolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingStringPolicybindingString(); + } + + public static void syncCreatePolicyBindingStringPolicybindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_StringPolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java new file mode 100644 index 000000000000..723efd94321b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBinding(); + } + + public static void asyncDeletePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + ApiFuture future = + policyBindingsClient.deletePolicyBindingCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java new file mode 100644 index 000000000000..81d3ce13fcfe --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBindingLRO(); + } + + public static void asyncDeletePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + OperationFuture future = + policyBindingsClient.deletePolicyBindingOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java new file mode 100644 index 000000000000..e23ba32ca4ee --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] +import com.google.iam.v3.DeletePolicyBindingRequest; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBinding { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBinding(); + } + + public static void syncDeletePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + policyBindingsClient.deletePolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java new file mode 100644 index 000000000000..eef2a3229c1e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_Policybindingname_sync] +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBindingPolicybindingname { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBindingPolicybindingname(); + } + + public static void syncDeletePolicyBindingPolicybindingname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + policyBindingsClient.deletePolicyBindingAsync(name).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_Policybindingname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java new file mode 100644 index 000000000000..e0033f74aa93 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_String_sync] +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBindingString { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBindingString(); + } + + public static void syncDeletePolicyBindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String name = + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString(); + policyBindingsClient.deletePolicyBindingAsync(name).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/AsyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/AsyncGetPolicyBinding.java new file mode 100644 index 000000000000..afa9c10f4738 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/AsyncGetPolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_GetPolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; + +public class AsyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + asyncGetPolicyBinding(); + } + + public static void asyncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .build(); + ApiFuture future = + policyBindingsClient.getPolicyBindingCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_GetPolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..77c90d81d674 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] +import com.google.iam.v3.GetPolicyBindingRequest; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .build(); + PolicyBinding response = policyBindingsClient.getPolicyBinding(request); + } + } +} +// [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java new file mode 100644 index 000000000000..716e4fcf1d01 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_GetPolicyBinding_Policybindingname_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncGetPolicyBindingPolicybindingname { + + public static void main(String[] args) throws Exception { + syncGetPolicyBindingPolicybindingname(); + } + + public static void syncGetPolicyBindingPolicybindingname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + PolicyBinding response = policyBindingsClient.getPolicyBinding(name); + } + } +} +// [END iam_v3_generated_PolicyBindings_GetPolicyBinding_Policybindingname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingString.java new file mode 100644 index 000000000000..02fc2ba2ea1f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/getpolicybinding/SyncGetPolicyBindingString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_GetPolicyBinding_String_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingName; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncGetPolicyBindingString { + + public static void main(String[] args) throws Exception { + syncGetPolicyBindingString(); + } + + public static void syncGetPolicyBindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String name = + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString(); + PolicyBinding response = policyBindingsClient.getPolicyBinding(name); + } + } +} +// [END iam_v3_generated_PolicyBindings_GetPolicyBinding_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindings.java new file mode 100644 index 000000000000..90c5f9010916 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindings.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class AsyncListPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncListPolicyBindings(); + } + + public static void asyncListPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + policyBindingsClient.listPolicyBindingsPagedCallable().futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java new file mode 100644 index 000000000000..90e1eadac0d8 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.ListPolicyBindingsResponse; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class AsyncListPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListPolicyBindingsPaged(); + } + + public static void asyncListPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListPolicyBindingsResponse response = + policyBindingsClient.listPolicyBindingsCallable().call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindings.java new file mode 100644 index 000000000000..e75beac8ba7a --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindings.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] +import com.google.iam.v3.ListPolicyBindingsRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncListPolicyBindings { + + public static void main(String[] args) throws Exception { + syncListPolicyBindings(); + } + + public static void syncListPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java new file mode 100644 index 000000000000..4d229c79eb91 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_Folderlocationname_sync] +import com.google.iam.v3.FolderLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncListPolicyBindingsFolderlocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsFolderlocationname(); + } + + public static void syncListPolicyBindingsFolderlocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_Folderlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java new file mode 100644 index 000000000000..8599f8890a91 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_Locationname_sync] +import com.google.iam.v3.LocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncListPolicyBindingsLocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsLocationname(); + } + + public static void syncListPolicyBindingsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_Locationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java new file mode 100644 index 000000000000..bab9cacec8e9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_Organizationlocationname_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncListPolicyBindingsOrganizationlocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsOrganizationlocationname(); + } + + public static void syncListPolicyBindingsOrganizationlocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_Organizationlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsString.java new file mode 100644 index 000000000000..2c300fd0d1ec --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/listpolicybindings/SyncListPolicyBindingsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_ListPolicyBindings_String_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncListPolicyBindingsString { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsString(); + } + + public static void syncListPolicyBindingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_ListPolicyBindings_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java new file mode 100644 index 000000000000..2fd8d8060d08 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; + +public class AsyncSearchTargetPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncSearchTargetPolicyBindings(); + } + + public static void asyncSearchTargetPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + policyBindingsClient.searchTargetPolicyBindingsPagedCallable().futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java new file mode 100644 index 000000000000..6591c1210e42 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3.SearchTargetPolicyBindingsResponse; + +public class AsyncSearchTargetPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncSearchTargetPolicyBindingsPaged(); + } + + public static void asyncSearchTargetPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + while (true) { + SearchTargetPolicyBindingsResponse response = + policyBindingsClient.searchTargetPolicyBindingsCallable().call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java new file mode 100644 index 000000000000..55f38a6f51b5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.SearchTargetPolicyBindingsRequest; + +public class SyncSearchTargetPolicyBindings { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindings(); + } + + public static void syncSearchTargetPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java new file mode 100644 index 000000000000..bdada8f531fb --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_FolderlocationnameString_sync] +import com.google.iam.v3.FolderLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsFolderlocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsFolderlocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsFolderlocationnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_FolderlocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java new file mode 100644 index 000000000000..f9dc0a3ed5b0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_LocationnameString_sync] +import com.google.iam.v3.LocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsLocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsLocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsLocationnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_LocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java new file mode 100644 index 000000000000..d0b7b6f8e33f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_OrganizationlocationnameString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsOrganizationlocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsOrganizationlocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsOrganizationlocationnameString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_OrganizationlocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java new file mode 100644 index 000000000000..68c968cf43ff --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_StringString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsStringString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsStringString(); + } + + public static void syncSearchTargetPolicyBindingsStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_StringString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java new file mode 100644 index 000000000000..ba74d0941318 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyBinding(); + } + + public static void asyncUpdatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + policyBindingsClient.updatePolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java new file mode 100644 index 000000000000..980e330b3b1c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyBindingLRO(); + } + + public static void asyncUpdatePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + policyBindingsClient.updatePolicyBindingOperationCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java new file mode 100644 index 000000000000..1ed96b2a1479 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.iam.v3.UpdatePolicyBindingRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyBinding(); + } + + public static void syncUpdatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + PolicyBinding response = policyBindingsClient.updatePolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java new file mode 100644 index 000000000000..04f69e5532c7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_PolicybindingFieldmask_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PolicyBindingsClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePolicyBindingPolicybindingFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyBindingPolicybindingFieldmask(); + } + + public static void syncUpdatePolicyBindingPolicybindingFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PolicyBinding response = + policyBindingsClient.updatePolicyBindingAsync(policyBinding, updateMask).get(); + } + } +} +// [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_PolicybindingFieldmask_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..b84b10067843 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindingsSettings_CreatePolicyBinding_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3.PolicyBindingsSettings; +import java.time.Duration; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBindingsSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3_generated_PolicyBindingsSettings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..729460c3f545 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PolicyBindingsSettings_GetPolicyBinding_sync] +import com.google.iam.v3.PolicyBindingsSettings; +import java.time.Duration; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsSettings.newBuilder(); + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .setRetrySettings( + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBindingsSettings policyBindingsSettings = policyBindingsSettingsBuilder.build(); + } +} +// [END iam_v3_generated_PolicyBindingsSettings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..76c487eb7817 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesSettings; +import com.google.iam.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a40ef652a9e8 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_SetEndpoint_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesSettings; +import com.google.iam.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..1dd18a10c625 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_UseHttpJsonTransport_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder().build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..1f2edd7a4fcc --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.longrunning.Operation; + +public class AsyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void asyncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..cf7a00a05648 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class AsyncCreatePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncCreatePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..d7d5c6a55f45 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync(request) + .get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java new file mode 100644 index 000000000000..77a64ef82df7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_OrganizationlocationnamePrincipalaccessboundarypolicyString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public +class SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString(); + } + + public static void + syncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_OrganizationlocationnamePrincipalaccessboundarypolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java new file mode 100644 index 000000000000..5f9054fd1ca6 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_StringPrincipalaccessboundarypolicyString_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString(); + } + + public static void + syncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_StringPrincipalaccessboundarypolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..5bd4536f114c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.longrunning.Operation; + +public class AsyncDeletePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncDeletePrincipalAccessBoundaryPolicy(); + } + + public static void asyncDeletePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .deletePrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..559f0ad91f11 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class AsyncDeletePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncDeletePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .deletePrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..97d99b0b4109 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicy(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(request).get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..db856ae33739 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java new file mode 100644 index 000000000000..1a779966adfc --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_String_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicyString { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicyString(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..43d23a0871f5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class AsyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPrincipalAccessBoundaryPolicy(); + } + + public static void asyncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .getPrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..36c6639e9f24 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(request); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..010691099c58 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname(); + } + + public static void syncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java new file mode 100644 index 000000000000..3b18536a5635 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_String_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicyString(); + } + + public static void syncGetPrincipalAccessBoundaryPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..b01f5982fca5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class AsyncListPrincipalAccessBoundaryPolicies { + + public static void main(String[] args) throws Exception { + asyncListPrincipalAccessBoundaryPolicies(); + } + + public static void asyncListPrincipalAccessBoundaryPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPoliciesPagedCallable() + .futureCall(request); + // Do something. + for (PrincipalAccessBoundaryPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java new file mode 100644 index 000000000000..18e292c1b8de --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class AsyncListPrincipalAccessBoundaryPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListPrincipalAccessBoundaryPoliciesPaged(); + } + + public static void asyncListPrincipalAccessBoundaryPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPrincipalAccessBoundaryPoliciesResponse response = + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPoliciesCallable() + .call(request); + for (PrincipalAccessBoundaryPolicy element : + response.getPrincipalAccessBoundaryPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..c4941db621d8 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +import com.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPolicies { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPolicies(); + } + + public static void syncListPrincipalAccessBoundaryPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(request) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java new file mode 100644 index 000000000000..e93bb50868d9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Organizationlocationname_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPoliciesOrganizationlocationname(); + } + + public static void syncListPrincipalAccessBoundaryPoliciesOrganizationlocationname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Organizationlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java new file mode 100644 index 000000000000..62eb90491af8 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_String_sync] +import com.google.iam.v3.OrganizationLocationName; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPoliciesString { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPoliciesString(); + } + + public static void syncListPrincipalAccessBoundaryPoliciesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java new file mode 100644 index 000000000000..d6121414d6a1 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; + +public class AsyncSearchPrincipalAccessBoundaryPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncSearchPrincipalAccessBoundaryPolicyBindings(); + } + + public static void asyncSearchPrincipalAccessBoundaryPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() + .futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java new file mode 100644 index 000000000000..fd6303c7cebc --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse; + +public class AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncSearchPrincipalAccessBoundaryPolicyBindingsPaged(); + } + + public static void asyncSearchPrincipalAccessBoundaryPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchPrincipalAccessBoundaryPolicyBindingsResponse response = + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindingsCallable() + .call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java new file mode 100644 index 000000000000..76ad5ec799d9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindings { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindings(); + } + + public static void syncSearchPrincipalAccessBoundaryPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(request) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..c521e52bbf75 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname(); + } + + public static void + syncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(name) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java new file mode 100644 index 000000000000..dcf8fecf8c28 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_String_sync] +import com.google.iam.v3.PolicyBinding; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicyName; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindingsString { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindingsString(); + } + + public static void syncSearchPrincipalAccessBoundaryPolicyBindingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(name) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..688e918b9b26 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePrincipalAccessBoundaryPolicy(); + } + + public static void asyncUpdatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..5c26097a7bf9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3.OperationMetadata; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncUpdatePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..46ae5cec2eb7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePrincipalAccessBoundaryPolicy(); + } + + public static void syncUpdatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyAsync(request) + .get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java new file mode 100644 index 000000000000..55d2446d19e5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_PrincipalaccessboundarypolicyFieldmask_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3.PrincipalAccessBoundaryPolicy; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask(); + } + + public static void syncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + } + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_PrincipalaccessboundarypolicyFieldmask_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..781e0a9d793c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPoliciesSettings_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesSettings; +import java.time.Duration; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + principalAccessBoundaryPoliciesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPoliciesSettings_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..556347f54411 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPoliciesSettings_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.PrincipalAccessBoundaryPoliciesSettings; +import java.time.Duration; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesSettings.newBuilder(); + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .setRetrySettings( + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + principalAccessBoundaryPoliciesSettingsBuilder.build(); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPoliciesSettings_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..22520cd71ed5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub.samples; + +// [START iam_v3_generated_PolicyBindingsStubSettings_CreatePolicyBinding_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3.stub.PolicyBindingsStubSettings; +import java.time.Duration; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBindingsSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3_generated_PolicyBindingsStubSettings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..0b12f9c78e85 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub.samples; + +// [START iam_v3_generated_PolicyBindingsStubSettings_GetPolicyBinding_sync] +import com.google.iam.v3.stub.PolicyBindingsStubSettings; +import java.time.Duration; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsStubSettings.newBuilder(); + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .setRetrySettings( + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBindingsStubSettings policyBindingsSettings = policyBindingsSettingsBuilder.build(); + } +} +// [END iam_v3_generated_PolicyBindingsStubSettings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..8b8fef40ea44 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPoliciesStubSettings_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import java.time.Duration; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesStubSettings.Builder + principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + principalAccessBoundaryPoliciesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPoliciesStubSettings_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..dc7f14c38567 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3.stub.samples; + +// [START iam_v3_generated_PrincipalAccessBoundaryPoliciesStubSettings_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import java.time.Duration; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesStubSettings.Builder + principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(); + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .setRetrySettings( + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PrincipalAccessBoundaryPoliciesStubSettings principalAccessBoundaryPoliciesSettings = + principalAccessBoundaryPoliciesSettingsBuilder.build(); + } +} +// [END iam_v3_generated_PrincipalAccessBoundaryPoliciesStubSettings_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d5e532e6ab90 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.PolicyBindingsSettings; +import com.google.iam.v3beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3beta_generated_PolicyBindings_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..88a2e111f029 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_Create_SetEndpoint_sync] +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.PolicyBindingsSettings; +import com.google.iam.v3beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newBuilder().setEndpoint(myEndpoint).build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3beta_generated_PolicyBindings_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..ae6bd8cedf01 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_Create_UseHttpJsonTransport_sync] +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.PolicyBindingsSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings policyBindingsSettings = + PolicyBindingsSettings.newHttpJsonBuilder().build(); + PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings); + } +} +// [END iam_v3beta_generated_PolicyBindings_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java new file mode 100644 index 000000000000..0746fd09d1ca --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.longrunning.Operation; + +public class AsyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBinding(); + } + + public static void asyncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + policyBindingsClient.createPolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java new file mode 100644 index 000000000000..24ad8636cee2 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/AsyncCreatePolicyBindingLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class AsyncCreatePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBindingLRO(); + } + + public static void asyncCreatePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + policyBindingsClient.createPolicyBindingOperationCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..471648340ac9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] +import com.google.iam.v3beta.CreatePolicyBindingRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + CreatePolicyBindingRequest request = + CreatePolicyBindingRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPolicyBindingId("policyBindingId1375821166") + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + PolicyBinding response = policyBindingsClient.createPolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java new file mode 100644 index 000000000000..f411e388faf2 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingFolderlocationnamePolicybindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_FolderlocationnamePolicybindingString_sync] +import com.google.iam.v3beta.FolderLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncCreatePolicyBindingFolderlocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingFolderlocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingFolderlocationnamePolicybindingString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_FolderlocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java new file mode 100644 index 000000000000..bdc0b3cb06a0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingLocationnamePolicybindingString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_LocationnamePolicybindingString_sync] +import com.google.iam.v3beta.LocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncCreatePolicyBindingLocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingLocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingLocationnamePolicybindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_LocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java new file mode 100644 index 000000000000..0d1c3fe8b884 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_OrganizationlocationnamePolicybindingString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncCreatePolicyBindingOrganizationlocationnamePolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingOrganizationlocationnamePolicybindingString(); + } + + public static void syncCreatePolicyBindingOrganizationlocationnamePolicybindingString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_OrganizationlocationnamePolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java new file mode 100644 index 000000000000..668f204cc959 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/createpolicybinding/SyncCreatePolicyBindingStringPolicybindingString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_StringPolicybindingString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncCreatePolicyBindingStringPolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBindingStringPolicybindingString(); + } + + public static void syncCreatePolicyBindingStringPolicybindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + String policyBindingId = "policyBindingId1375821166"; + PolicyBinding response = + policyBindingsClient + .createPolicyBindingAsync(parent, policyBinding, policyBindingId) + .get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_StringPolicybindingString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java new file mode 100644 index 000000000000..fd82e280faec --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBinding.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBinding(); + } + + public static void asyncDeletePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + ApiFuture future = + policyBindingsClient.deletePolicyBindingCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java new file mode 100644 index 000000000000..b52e37865d69 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/AsyncDeletePolicyBindingLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBindingLRO(); + } + + public static void asyncDeletePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + OperationFuture future = + policyBindingsClient.deletePolicyBindingOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java new file mode 100644 index 000000000000..37da04025f93 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBinding.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] +import com.google.iam.v3beta.DeletePolicyBindingRequest; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBinding { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBinding(); + } + + public static void syncDeletePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + DeletePolicyBindingRequest request = + DeletePolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .build(); + policyBindingsClient.deletePolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java new file mode 100644 index 000000000000..44539095ce0d --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingPolicybindingname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_Policybindingname_sync] +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBindingPolicybindingname { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBindingPolicybindingname(); + } + + public static void syncDeletePolicyBindingPolicybindingname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + policyBindingsClient.deletePolicyBindingAsync(name).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_Policybindingname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java new file mode 100644 index 000000000000..7a4d3a51460b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/deletepolicybinding/SyncDeletePolicyBindingString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_String_sync] +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBindingString { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBindingString(); + } + + public static void syncDeletePolicyBindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String name = + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString(); + policyBindingsClient.deletePolicyBindingAsync(name).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/AsyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/AsyncGetPolicyBinding.java new file mode 100644 index 000000000000..15d7b80d3473 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/AsyncGetPolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class AsyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + asyncGetPolicyBinding(); + } + + public static void asyncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .build(); + ApiFuture future = + policyBindingsClient.getPolicyBindingCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..3fdac287a95c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] +import com.google.iam.v3beta.GetPolicyBindingRequest; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + GetPolicyBindingRequest request = + GetPolicyBindingRequest.newBuilder() + .setName( + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]") + .toString()) + .build(); + PolicyBinding response = policyBindingsClient.getPolicyBinding(request); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java new file mode 100644 index 000000000000..c890d05ab671 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingPolicybindingname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_Policybindingname_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncGetPolicyBindingPolicybindingname { + + public static void main(String[] args) throws Exception { + syncGetPolicyBindingPolicybindingname(); + } + + public static void syncGetPolicyBindingPolicybindingname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBindingName name = + PolicyBindingName.ofProjectLocationPolicyBindingName( + "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]"); + PolicyBinding response = policyBindingsClient.getPolicyBinding(name); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_Policybindingname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingString.java new file mode 100644 index 000000000000..1c7b7f8d27c7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/getpolicybinding/SyncGetPolicyBindingString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_String_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingName; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncGetPolicyBindingString { + + public static void main(String[] args) throws Exception { + syncGetPolicyBindingString(); + } + + public static void syncGetPolicyBindingString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String name = + PolicyBindingName.ofOrganizationLocationPolicyBindingName( + "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]") + .toString(); + PolicyBinding response = policyBindingsClient.getPolicyBinding(name); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindings.java new file mode 100644 index 000000000000..b21f48996404 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindings.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class AsyncListPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncListPolicyBindings(); + } + + public static void asyncListPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + policyBindingsClient.listPolicyBindingsPagedCallable().futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java new file mode 100644 index 000000000000..b0aa1e1f285b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/AsyncListPolicyBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.ListPolicyBindingsResponse; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class AsyncListPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListPolicyBindingsPaged(); + } + + public static void asyncListPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListPolicyBindingsResponse response = + policyBindingsClient.listPolicyBindingsCallable().call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindings.java new file mode 100644 index 000000000000..e378d8b0eeaf --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindings.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] +import com.google.iam.v3beta.ListPolicyBindingsRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncListPolicyBindings { + + public static void main(String[] args) throws Exception { + syncListPolicyBindings(); + } + + public static void syncListPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + ListPolicyBindingsRequest request = + ListPolicyBindingsRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java new file mode 100644 index 000000000000..b2e179d8203b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsFolderlocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Folderlocationname_sync] +import com.google.iam.v3beta.FolderLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncListPolicyBindingsFolderlocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsFolderlocationname(); + } + + public static void syncListPolicyBindingsFolderlocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Folderlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java new file mode 100644 index 000000000000..d6451865b454 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Locationname_sync] +import com.google.iam.v3beta.LocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncListPolicyBindingsLocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsLocationname(); + } + + public static void syncListPolicyBindingsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Locationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java new file mode 100644 index 000000000000..6271a7eaa058 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsOrganizationlocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Organizationlocationname_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncListPolicyBindingsOrganizationlocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsOrganizationlocationname(); + } + + public static void syncListPolicyBindingsOrganizationlocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_Organizationlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsString.java new file mode 100644 index 000000000000..73f6371226f0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/listpolicybindings/SyncListPolicyBindingsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_String_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncListPolicyBindingsString { + + public static void main(String[] args) throws Exception { + syncListPolicyBindingsString(); + } + + public static void syncListPolicyBindingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java new file mode 100644 index 000000000000..9f22da871aa5 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindings.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; + +public class AsyncSearchTargetPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncSearchTargetPolicyBindings(); + } + + public static void asyncSearchTargetPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + policyBindingsClient.searchTargetPolicyBindingsPagedCallable().futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java new file mode 100644 index 000000000000..29eb81390d0f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/AsyncSearchTargetPolicyBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; +import com.google.iam.v3beta.SearchTargetPolicyBindingsResponse; + +public class AsyncSearchTargetPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncSearchTargetPolicyBindingsPaged(); + } + + public static void asyncSearchTargetPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + while (true) { + SearchTargetPolicyBindingsResponse response = + policyBindingsClient.searchTargetPolicyBindingsCallable().call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java new file mode 100644 index 000000000000..52a01193c665 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.SearchTargetPolicyBindingsRequest; + +public class SyncSearchTargetPolicyBindings { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindings(); + } + + public static void syncSearchTargetPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + SearchTargetPolicyBindingsRequest request = + SearchTargetPolicyBindingsRequest.newBuilder() + .setTarget("target-880905839") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .build(); + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java new file mode 100644 index 000000000000..3bd07c1c392f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsFolderlocationnameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_FolderlocationnameString_sync] +import com.google.iam.v3beta.FolderLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsFolderlocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsFolderlocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsFolderlocationnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_FolderlocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java new file mode 100644 index 000000000000..1ef6513bbcdd --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsLocationnameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_LocationnameString_sync] +import com.google.iam.v3beta.LocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsLocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsLocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsLocationnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_LocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java new file mode 100644 index 000000000000..6475606c88ad --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsOrganizationlocationnameString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_OrganizationlocationnameString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsOrganizationlocationnameString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsOrganizationlocationnameString(); + } + + public static void syncSearchTargetPolicyBindingsOrganizationlocationnameString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_OrganizationlocationnameString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java new file mode 100644 index 000000000000..8c8a46d9be4d --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/searchtargetpolicybindings/SyncSearchTargetPolicyBindingsStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_StringString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; + +public class SyncSearchTargetPolicyBindingsStringString { + + public static void main(String[] args) throws Exception { + syncSearchTargetPolicyBindingsStringString(); + } + + public static void syncSearchTargetPolicyBindingsStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + String target = "target-880905839"; + for (PolicyBinding element : + policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_StringString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java new file mode 100644 index 000000000000..160590f817af --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePolicyBinding { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyBinding(); + } + + public static void asyncUpdatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + policyBindingsClient.updatePolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java new file mode 100644 index 000000000000..4da3ef401c54 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/AsyncUpdatePolicyBindingLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicyBindingLRO(); + } + + public static void asyncUpdatePolicyBindingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + policyBindingsClient.updatePolicyBindingOperationCallable().futureCall(request); + // Do something. + PolicyBinding response = future.get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java new file mode 100644 index 000000000000..4e0ce83ac5b0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBinding.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.iam.v3beta.UpdatePolicyBindingRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyBinding(); + } + + public static void syncUpdatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + UpdatePolicyBindingRequest request = + UpdatePolicyBindingRequest.newBuilder() + .setPolicyBinding(PolicyBinding.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + PolicyBinding response = policyBindingsClient.updatePolicyBindingAsync(request).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java new file mode 100644 index 000000000000..3b798d3fb2a4 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindings/updatepolicybinding/SyncUpdatePolicyBindingPolicybindingFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_PolicybindingFieldmask_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PolicyBindingsClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePolicyBindingPolicybindingFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyBindingPolicybindingFieldmask(); + } + + public static void syncUpdatePolicyBindingPolicybindingFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) { + PolicyBinding policyBinding = PolicyBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PolicyBinding response = + policyBindingsClient.updatePolicyBindingAsync(policyBinding, updateMask).get(); + } + } +} +// [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_PolicybindingFieldmask_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..eca7c0d7095b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindingsSettings_CreatePolicyBinding_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3beta.PolicyBindingsSettings; +import java.time.Duration; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBindingsSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3beta_generated_PolicyBindingsSettings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..d129e3262d38 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/policybindingssettings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PolicyBindingsSettings_GetPolicyBinding_sync] +import com.google.iam.v3beta.PolicyBindingsSettings; +import java.time.Duration; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsSettings.newBuilder(); + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .setRetrySettings( + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBindingsSettings policyBindingsSettings = policyBindingsSettingsBuilder.build(); + } +} +// [END iam_v3beta_generated_PolicyBindingsSettings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..55892d76ff4e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesSettings; +import com.google.iam.v3beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..67685a58418c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_SetEndpoint_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesSettings; +import com.google.iam.v3beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_SetEndpoint_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..41af7acd2e68 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_UseHttpJsonTransport_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + PrincipalAccessBoundaryPoliciesSettings.newHttpJsonBuilder().build(); + PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create(principalAccessBoundaryPoliciesSettings); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_Create_UseHttpJsonTransport_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..c7f9ec942f5b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.longrunning.Operation; + +public class AsyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void asyncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..254f670562b3 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/AsyncCreatePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class AsyncCreatePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncCreatePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..91fdda7cc835 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + CreatePrincipalAccessBoundaryPolicyRequest request = + CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPrincipalAccessBoundaryPolicyId("principalAccessBoundaryPolicyId-198573175") + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync(request) + .get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java new file mode 100644 index 000000000000..c6f56730e5ea --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_OrganizationlocationnamePrincipalaccessboundarypolicyString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public +class SyncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString(); + } + + public static void + syncCreatePrincipalAccessBoundaryPolicyOrganizationlocationnamePrincipalaccessboundarypolicyString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_OrganizationlocationnamePrincipalaccessboundarypolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java new file mode 100644 index 000000000000..849f6db09878 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_StringPrincipalaccessboundarypolicyString_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class SyncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString(); + } + + public static void + syncCreatePrincipalAccessBoundaryPolicyStringPrincipalaccessboundarypolicyString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + String principalAccessBoundaryPolicyId = "principalAccessBoundaryPolicyId-198573175"; + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .createPrincipalAccessBoundaryPolicyAsync( + parent, principalAccessBoundaryPolicy, principalAccessBoundaryPolicyId) + .get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_StringPrincipalaccessboundarypolicyString_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..d8519475b297 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.longrunning.Operation; + +public class AsyncDeletePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncDeletePrincipalAccessBoundaryPolicy(); + } + + public static void asyncDeletePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .deletePrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..ec8699e6769d --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/AsyncDeletePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class AsyncDeletePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncDeletePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .deletePrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..85582b75e6ff --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicy(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + DeletePrincipalAccessBoundaryPolicyRequest request = + DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setEtag("etag3123477") + .setValidateOnly(true) + .setForce(true) + .build(); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(request).get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..f1e924ad225e --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java new file mode 100644 index 000000000000..0c7e235d98cd --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/deleteprincipalaccessboundarypolicy/SyncDeletePrincipalAccessBoundaryPolicyString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_String_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.protobuf.Empty; + +public class SyncDeletePrincipalAccessBoundaryPolicyString { + + public static void main(String[] args) throws Exception { + syncDeletePrincipalAccessBoundaryPolicyString(); + } + + public static void syncDeletePrincipalAccessBoundaryPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + principalAccessBoundaryPoliciesClient.deletePrincipalAccessBoundaryPolicyAsync(name).get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..ce7427fd3811 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/AsyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class AsyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPrincipalAccessBoundaryPolicy(); + } + + public static void asyncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .getPrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..ee32ea7d9ee7 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + GetPrincipalAccessBoundaryPolicyRequest request = + GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(request); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..4f437491d058 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname(); + } + + public static void syncGetPrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java new file mode 100644 index 000000000000..0ce3487557cc --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicyString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_String_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class SyncGetPrincipalAccessBoundaryPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicyString(); + } + + public static void syncGetPrincipalAccessBoundaryPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient.getPrincipalAccessBoundaryPolicy(name); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..8b7fd3edfa7d --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class AsyncListPrincipalAccessBoundaryPolicies { + + public static void main(String[] args) throws Exception { + asyncListPrincipalAccessBoundaryPolicies(); + } + + public static void asyncListPrincipalAccessBoundaryPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPoliciesPagedCallable() + .futureCall(request); + // Do something. + for (PrincipalAccessBoundaryPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java new file mode 100644 index 000000000000..b6778b0046fb --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/AsyncListPrincipalAccessBoundaryPoliciesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class AsyncListPrincipalAccessBoundaryPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListPrincipalAccessBoundaryPoliciesPaged(); + } + + public static void asyncListPrincipalAccessBoundaryPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPrincipalAccessBoundaryPoliciesResponse response = + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPoliciesCallable() + .call(request); + for (PrincipalAccessBoundaryPolicy element : + response.getPrincipalAccessBoundaryPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java new file mode 100644 index 000000000000..965bee7516a8 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPolicies.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +import com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest; +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPolicies { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPolicies(); + } + + public static void syncListPrincipalAccessBoundaryPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + ListPrincipalAccessBoundaryPoliciesRequest request = + ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(request) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java new file mode 100644 index 000000000000..11a8abd99a60 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Organizationlocationname_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPoliciesOrganizationlocationname { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPoliciesOrganizationlocationname(); + } + + public static void syncListPrincipalAccessBoundaryPoliciesOrganizationlocationname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_Organizationlocationname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java new file mode 100644 index 000000000000..d2d7f7ae1022 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/listprincipalaccessboundarypolicies/SyncListPrincipalAccessBoundaryPoliciesString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_String_sync] +import com.google.iam.v3beta.OrganizationLocationName; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; + +public class SyncListPrincipalAccessBoundaryPoliciesString { + + public static void main(String[] args) throws Exception { + syncListPrincipalAccessBoundaryPoliciesString(); + } + + public static void syncListPrincipalAccessBoundaryPoliciesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + for (PrincipalAccessBoundaryPolicy element : + principalAccessBoundaryPoliciesClient + .listPrincipalAccessBoundaryPolicies(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java new file mode 100644 index 000000000000..698b290afa8b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindings.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; + +public class AsyncSearchPrincipalAccessBoundaryPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncSearchPrincipalAccessBoundaryPolicyBindings(); + } + + public static void asyncSearchPrincipalAccessBoundaryPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindingsPagedCallable() + .futureCall(request); + // Do something. + for (PolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java new file mode 100644 index 000000000000..6fcb442039de --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Paged_async] +import com.google.common.base.Strings; +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse; + +public class AsyncSearchPrincipalAccessBoundaryPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncSearchPrincipalAccessBoundaryPolicyBindingsPaged(); + } + + public static void asyncSearchPrincipalAccessBoundaryPolicyBindingsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchPrincipalAccessBoundaryPolicyBindingsResponse response = + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindingsCallable() + .call(request); + for (PolicyBinding element : response.getPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Paged_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java new file mode 100644 index 000000000000..544160c4ddc9 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindings.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; +import com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindings { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindings(); + } + + public static void syncSearchPrincipalAccessBoundaryPolicyBindings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + SearchPrincipalAccessBoundaryPolicyBindingsRequest request = + SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + .setName( + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(request) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java new file mode 100644 index 000000000000..6995253cac0c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Principalaccessboundarypolicyname_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname(); + } + + public static void + syncSearchPrincipalAccessBoundaryPolicyBindingsPrincipalaccessboundarypolicyname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicyName name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]"); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(name) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_Principalaccessboundarypolicyname_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java new file mode 100644 index 000000000000..3fe0cbab2238 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/searchprincipalaccessboundarypolicybindings/SyncSearchPrincipalAccessBoundaryPolicyBindingsString.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_String_sync] +import com.google.iam.v3beta.PolicyBinding; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicyName; + +public class SyncSearchPrincipalAccessBoundaryPolicyBindingsString { + + public static void main(String[] args) throws Exception { + syncSearchPrincipalAccessBoundaryPolicyBindingsString(); + } + + public static void syncSearchPrincipalAccessBoundaryPolicyBindingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + String name = + PrincipalAccessBoundaryPolicyName.of( + "[ORGANIZATION]", "[LOCATION]", "[PRINCIPAL_ACCESS_BOUNDARY_POLICY]") + .toString(); + for (PolicyBinding element : + principalAccessBoundaryPoliciesClient + .searchPrincipalAccessBoundaryPolicyBindings(name) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_String_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..997bc5594cd0 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePrincipalAccessBoundaryPolicy(); + } + + public static void asyncUpdatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java new file mode 100644 index 000000000000..b8747e5876f1 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/AsyncUpdatePrincipalAccessBoundaryPolicyLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.iam.v3beta.OperationMetadata; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePrincipalAccessBoundaryPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePrincipalAccessBoundaryPolicyLRO(); + } + + public static void asyncUpdatePrincipalAccessBoundaryPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyOperationCallable() + .futureCall(request); + // Do something. + PrincipalAccessBoundaryPolicy response = future.get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_LRO_async] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..e45bf5f41990 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePrincipalAccessBoundaryPolicy(); + } + + public static void syncUpdatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + UpdatePrincipalAccessBoundaryPolicyRequest request = + UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + .setPrincipalAccessBoundaryPolicy(PrincipalAccessBoundaryPolicy.newBuilder().build()) + .setValidateOnly(true) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyAsync(request) + .get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java new file mode 100644 index 000000000000..9813f877b659 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypolicies/updateprincipalaccessboundarypolicy/SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_PrincipalaccessboundarypolicyFieldmask_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesClient; +import com.google.iam.v3beta.PrincipalAccessBoundaryPolicy; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask(); + } + + public static void syncUpdatePrincipalAccessBoundaryPolicyPrincipalaccessboundarypolicyFieldmask() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PrincipalAccessBoundaryPoliciesClient principalAccessBoundaryPoliciesClient = + PrincipalAccessBoundaryPoliciesClient.create()) { + PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy = + PrincipalAccessBoundaryPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PrincipalAccessBoundaryPolicy response = + principalAccessBoundaryPoliciesClient + .updatePrincipalAccessBoundaryPolicyAsync(principalAccessBoundaryPolicy, updateMask) + .get(); + } + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_PrincipalaccessboundarypolicyFieldmask_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..000c6e9b936f --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPoliciesSettings_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesSettings; +import java.time.Duration; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + principalAccessBoundaryPoliciesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPoliciesSettings_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..1aac15448f7b --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/principalaccessboundarypoliciessettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPoliciesSettings_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesSettings; +import java.time.Duration; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesSettings.Builder principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesSettings.newBuilder(); + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .setRetrySettings( + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PrincipalAccessBoundaryPoliciesSettings principalAccessBoundaryPoliciesSettings = + principalAccessBoundaryPoliciesSettingsBuilder.build(); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPoliciesSettings_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java new file mode 100644 index 000000000000..0daf2568f3bd --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/createpolicybinding/SyncCreatePolicyBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub.samples; + +// [START iam_v3beta_generated_PolicyBindingsStubSettings_CreatePolicyBinding_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3beta.stub.PolicyBindingsStubSettings; +import java.time.Duration; + +public class SyncCreatePolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBinding(); + } + + public static void syncCreatePolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBindingsSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3beta_generated_PolicyBindingsStubSettings_CreatePolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java new file mode 100644 index 000000000000..53e4b2673307 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/policybindingsstubsettings/getpolicybinding/SyncGetPolicyBinding.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub.samples; + +// [START iam_v3beta_generated_PolicyBindingsStubSettings_GetPolicyBinding_sync] +import com.google.iam.v3beta.stub.PolicyBindingsStubSettings; +import java.time.Duration; + +public class SyncGetPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetPolicyBinding(); + } + + public static void syncGetPolicyBinding() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBindingsStubSettings.Builder policyBindingsSettingsBuilder = + PolicyBindingsStubSettings.newBuilder(); + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .setRetrySettings( + policyBindingsSettingsBuilder + .getPolicyBindingSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBindingsStubSettings policyBindingsSettings = policyBindingsSettingsBuilder.build(); + } +} +// [END iam_v3beta_generated_PolicyBindingsStubSettings_GetPolicyBinding_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..c5b869541b51 --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/createprincipalaccessboundarypolicy/SyncCreatePrincipalAccessBoundaryPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPoliciesStubSettings_CreatePrincipalAccessBoundaryPolicy_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.iam.v3beta.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import java.time.Duration; + +public class SyncCreatePrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncCreatePrincipalAccessBoundaryPolicy(); + } + + public static void syncCreatePrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesStubSettings.Builder + principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + principalAccessBoundaryPoliciesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPoliciesStubSettings_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java new file mode 100644 index 000000000000..6ff8cf77226c --- /dev/null +++ b/java-common-iam/samples/snippets/generated/com/google/iam/v3beta/stub/principalaccessboundarypoliciesstubsettings/getprincipalaccessboundarypolicy/SyncGetPrincipalAccessBoundaryPolicy.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ + +package com.google.iam.v3beta.stub.samples; + +// [START iam_v3beta_generated_PrincipalAccessBoundaryPoliciesStubSettings_GetPrincipalAccessBoundaryPolicy_sync] +import com.google.iam.v3beta.stub.PrincipalAccessBoundaryPoliciesStubSettings; +import java.time.Duration; + +public class SyncGetPrincipalAccessBoundaryPolicy { + + public static void main(String[] args) throws Exception { + syncGetPrincipalAccessBoundaryPolicy(); + } + + public static void syncGetPrincipalAccessBoundaryPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PrincipalAccessBoundaryPoliciesStubSettings.Builder + principalAccessBoundaryPoliciesSettingsBuilder = + PrincipalAccessBoundaryPoliciesStubSettings.newBuilder(); + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .setRetrySettings( + principalAccessBoundaryPoliciesSettingsBuilder + .getPrincipalAccessBoundaryPolicySettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PrincipalAccessBoundaryPoliciesStubSettings principalAccessBoundaryPoliciesSettings = + principalAccessBoundaryPoliciesSettingsBuilder.build(); + } +} +// [END iam_v3beta_generated_PrincipalAccessBoundaryPoliciesStubSettings_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/java-common-protos/.OwlBot-hermetic.yaml b/java-common-protos/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..5562845a7ec8 --- /dev/null +++ b/java-common-protos/.OwlBot-hermetic.yaml @@ -0,0 +1,36 @@ +# Copyright 2024 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. + + +deep-remove-regex: +- "/java-common-protos/grpc-google-.*/src" +- "/java-common-protos/proto-google-.*/src" +- "/java-common-protos/google-.*/src" +- "/java-common-protos/samples/snippets/generated" + +deep-preserve-regex: +- "/java-common-protos/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" +- "/.*google-.*/src/main/java/.*/stub/Version.java" + +deep-copy-regex: +- source: "/google/apps/card/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-common-protos/$1/proto-proto-google-common-protos-$1/src" +- source: "/google/apps/card/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-common-protos/$1/grpc-proto-google-common-protos-$1/src" +- source: "/google/apps/card/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-common-protos/$1/proto-google-common-protos/src" +- source: "/google/apps/card/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-common-protos/$1/samples/snippets/generated" + +api-name: common-protos \ No newline at end of file diff --git a/java-common-protos/.repo-metadata.json b/java-common-protos/.repo-metadata.json new file mode 100644 index 000000000000..d519c2765f71 --- /dev/null +++ b/java-common-protos/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "common-protos", + "name_pretty": "Common Protos", + "product_documentation": "https://github.com/googleapis/api-common-protos", + "api_description": "Protobuf classes for Google's common protos.", + "client_documentation": "https://cloud.google.com/java/docs/reference/proto-google-common-protos/latest/history", + "release_level": "stable", + "transport": "grpc", + "language": "java", + "repo": "googleapis/sdk-platform-java", + "repo_short": "java-common-protos", + "distribution_name": "com.google.api.grpc:proto-google-common-protos", + "library_type": "OTHER", + "requires_billing": true, + "excluded_dependencies": "proto-google-common-protos,grpc-google-common-protos,proto-google-common-protos-parent", + "excluded_poms": "proto-google-common-protos-bom,proto-google-common-protos" +} \ No newline at end of file diff --git a/java-common-protos/README.md b/java-common-protos/README.md new file mode 100644 index 000000000000..a0a4913d5b0a --- /dev/null +++ b/java-common-protos/README.md @@ -0,0 +1,176 @@ +# Google Common Protos Client for Java + +Java idiomatic client for [Common Protos][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + + +```xml + + com.google.api.grpc + proto-google-common-protos + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.api.grpc:proto-google-common-protos:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Common Protos APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Common Protos API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Common Protos [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Common Protos. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `proto-google-common-protos` library. See the [Quickstart](#quickstart) section +to add `proto-google-common-protos` as a dependency in your code. + +## About Common Protos + + +[Common Protos][product-docs] Protobuf classes for Google's common protos. + +See the [Common Protos client library docs][javadocs] to learn how to +use this Common Protos Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Common Protos uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://github.com/googleapis/api-common-protos +[javadocs]: https://cloud.google.com/java/docs/reference/proto-google-common-protos/latest/history +[stability-image]: https://img.shields.io/badge/stability-stable-green +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.api.grpc/proto-google-common-protos.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.api.grpc/proto-google-common-protos/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/sdk-platform-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/sdk-platform-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/sdk-platform-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing + +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-common-protos/owlbot.py b/java-common-protos/owlbot.py new file mode 100644 index 000000000000..6da47954339a --- /dev/null +++ b/java-common-protos/owlbot.py @@ -0,0 +1,38 @@ +# Copyright 2024 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 +# +# https://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. + +import synthtool as s +from synthtool.languages import java + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + monorepo=True, + excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore", + ], +) \ No newline at end of file diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml new file mode 100644 index 000000000000..b464bb5606ec --- /dev/null +++ b/java-common-protos/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + com.google.api.grpc.api.grpc + proto-google-common-protos-parent + pom + 2.70.0 + Google Common Protos Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.85.0 + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + proto-google-common-protos-parent + + + + + + com.google.api.grpc.api.grpc + proto-google-common-protos + 2.70.0 + + + com.google.api.grpc.api.grpc + proto-proto-google-common-protos-v1 + 2.70.0 + + + + + + + proto-google-common-protos + proto-proto-google-common-protos-v1 + proto-google-common-protos-bom + + + diff --git a/java-common-protos/proto-proto-google-common-protos-v1/pom.xml b/java-common-protos/proto-proto-google-common-protos-v1/pom.xml new file mode 100644 index 000000000000..fd2fdfdeb186 --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc.api.grpc + proto-proto-google-common-protos-v1 + 2.70.0 + proto-proto-google-common-protos-v1 + Proto library for proto-google-common-protos + + com.google.api.grpc + proto-google-common-protos-parent + 2.70.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Action.java b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Action.java new file mode 100644 index 000000000000..cbb83f259f2a --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Action.java @@ -0,0 +1,3399 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/apps/card/v1/card.proto +// Protobuf Java Version: 4.33.2 + +package com.google.apps.card.v1; + +/** + * + * + *
+ * An action that describes the behavior when the form is submitted.
+ * For example, you can invoke an Apps Script script to handle the form.
+ * If the action is triggered, the form values are sent to the server.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.Action} + */ +@com.google.protobuf.Generated +public final class Action extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Action) + ActionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Action"); + } + + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Action() { + function_ = ""; + parameters_ = java.util.Collections.emptyList(); + loadIndicator_ = 0; + interaction_ = 0; + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Action.class, com.google.apps.card.v1.Action.Builder.class); + } + + /** + * + * + *
+   * Specifies the loading indicator that the action displays while
+   * making the call to the action.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Action.LoadIndicator} + */ + public enum LoadIndicator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Displays a spinner to indicate that content is loading.
+     * 
+ * + * SPINNER = 0; + */ + SPINNER(0), + /** + * + * + *
+     * Nothing is displayed.
+     * 
+ * + * NONE = 1; + */ + NONE(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LoadIndicator"); + } + + /** + * + * + *
+     * Displays a spinner to indicate that content is loading.
+     * 
+ * + * SPINNER = 0; + */ + public static final int SPINNER_VALUE = 0; + + /** + * + * + *
+     * Nothing is displayed.
+     * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LoadIndicator valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LoadIndicator forNumber(int value) { + switch (value) { + case 0: + return SPINNER; + case 1: + return NONE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LoadIndicator findValueByNumber(int number) { + return LoadIndicator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.apps.card.v1.Action.getDescriptor().getEnumTypes().get(0); + } + + private static final LoadIndicator[] VALUES = values(); + + public static LoadIndicator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LoadIndicator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Action.LoadIndicator) + } + + /** + * + * + *
+   * Optional. Required when opening a
+   * [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * What to do in response to an interaction with a user, such as a user
+   * clicking a button in a card message.
+   *
+   * If unspecified, the app responds by executing an `action`—like opening a
+   * link or running a function—as normal.
+   *
+   * By specifying an `interaction`, the app can respond in special interactive
+   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+   * open a [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * When specified, a loading indicator isn't shown. If specified for
+   * an add-on, the entire card is stripped and nothing is shown in the client.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Action.Interaction} + */ + public enum Interaction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. The `action` executes as normal.
+     * 
+ * + * INTERACTION_UNSPECIFIED = 0; + */ + INTERACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
+     * windowed, card-based interface that Chat apps use to interact with users.
+     *
+     * Only supported by Chat apps in response to button-clicks on card
+     * messages. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the
+     * client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * OPEN_DIALOG = 1; + */ + OPEN_DIALOG(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Interaction"); + } + + /** + * + * + *
+     * Default value. The `action` executes as normal.
+     * 
+ * + * INTERACTION_UNSPECIFIED = 0; + */ + public static final int INTERACTION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
+     * windowed, card-based interface that Chat apps use to interact with users.
+     *
+     * Only supported by Chat apps in response to button-clicks on card
+     * messages. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the
+     * client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * OPEN_DIALOG = 1; + */ + public static final int OPEN_DIALOG_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Interaction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Interaction forNumber(int value) { + switch (value) { + case 0: + return INTERACTION_UNSPECIFIED; + case 1: + return OPEN_DIALOG; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Interaction findValueByNumber(int number) { + return Interaction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.apps.card.v1.Action.getDescriptor().getEnumTypes().get(1); + } + + private static final Interaction[] VALUES = values(); + + public static Interaction valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Interaction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Action.Interaction) + } + + public interface ActionParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Action.ActionParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the parameter for the action script.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+     * The name of the parameter for the action script.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * The value of the parameter.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+     * The value of the parameter.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + + /** + * + * + *
+   * List of string parameters to supply when the action method is invoked.
+   * For example, consider three snooze buttons: snooze now, snooze one day,
+   * or snooze next week. You might use `action method = snooze()`, passing the
+   * snooze type and snooze time in the list of string parameters.
+   *
+   * To learn more, see
+   * [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Action.ActionParameter} + */ + public static final class ActionParameter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Action.ActionParameter) + ActionParameterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActionParameter"); + } + + // Use ActionParameter.newBuilder() to construct. + private ActionParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActionParameter() { + key_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Action.ActionParameter.class, + com.google.apps.card.v1.Action.ActionParameter.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+     * The name of the parameter for the action script.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + + /** + * + * + *
+     * The name of the parameter for the action script.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+     * The value of the parameter.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + + /** + * + * + *
+     * The value of the parameter.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.apps.card.v1.Action.ActionParameter)) { + return super.equals(obj); + } + com.google.apps.card.v1.Action.ActionParameter other = + (com.google.apps.card.v1.Action.ActionParameter) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action.ActionParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.apps.card.v1.Action.ActionParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * List of string parameters to supply when the action method is invoked.
+     * For example, consider three snooze buttons: snooze now, snooze one day,
+     * or snooze next week. You might use `action method = snooze()`, passing the
+     * snooze type and snooze time in the list of string parameters.
+     *
+     * To learn more, see
+     * [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * Protobuf type {@code google.apps.card.v1.Action.ActionParameter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Action.ActionParameter) + com.google.apps.card.v1.Action.ActionParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Action.ActionParameter.class, + com.google.apps.card.v1.Action.ActionParameter.Builder.class); + } + + // Construct using com.google.apps.card.v1.Action.ActionParameter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameter getDefaultInstanceForType() { + return com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameter build() { + com.google.apps.card.v1.Action.ActionParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameter buildPartial() { + com.google.apps.card.v1.Action.ActionParameter result = + new com.google.apps.card.v1.Action.ActionParameter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.Action.ActionParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.apps.card.v1.Action.ActionParameter) { + return mergeFrom((com.google.apps.card.v1.Action.ActionParameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Action.ActionParameter other) { + if (other == com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + + /** + * + * + *
+       * The name of the parameter for the action script.
+       * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The name of the parameter for the action script.
+       * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The name of the parameter for the action script.
+       * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The name of the parameter for the action script.
+       * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * The name of the parameter for the action script.
+       * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+       * The value of the parameter.
+       * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The value of the parameter.
+       * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The value of the parameter.
+       * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The value of the parameter.
+       * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The value of the parameter.
+       * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Action.ActionParameter) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Action.ActionParameter) + private static final com.google.apps.card.v1.Action.ActionParameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Action.ActionParameter(); + } + + public static com.google.apps.card.v1.Action.ActionParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActionParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FUNCTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object function_ = ""; + + /** + * + * + *
+   * A custom function to invoke when the containing element is
+   * clicked or otherwise activated.
+   *
+   * For example usage, see [Read form
+   * data](https://developers.google.com/workspace/chat/read-form-data).
+   * 
+ * + * string function = 1; + * + * @return The function. + */ + @java.lang.Override + public java.lang.String getFunction() { + java.lang.Object ref = function_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + function_ = s; + return s; + } + } + + /** + * + * + *
+   * A custom function to invoke when the containing element is
+   * clicked or otherwise activated.
+   *
+   * For example usage, see [Read form
+   * data](https://developers.google.com/workspace/chat/read-form-data).
+   * 
+ * + * string function = 1; + * + * @return The bytes for function. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFunctionBytes() { + java.lang.Object ref = function_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + function_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List parameters_; + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameter getParameters(int index) { + return parameters_.get(index); + } + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder(int index) { + return parameters_.get(index); + } + + public static final int LOAD_INDICATOR_FIELD_NUMBER = 3; + private int loadIndicator_ = 0; + + /** + * + * + *
+   * Specifies the loading indicator that the action displays while
+   * making the call to the action.
+   * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The enum numeric value on the wire for loadIndicator. + */ + @java.lang.Override + public int getLoadIndicatorValue() { + return loadIndicator_; + } + + /** + * + * + *
+   * Specifies the loading indicator that the action displays while
+   * making the call to the action.
+   * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The loadIndicator. + */ + @java.lang.Override + public com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator() { + com.google.apps.card.v1.Action.LoadIndicator result = + com.google.apps.card.v1.Action.LoadIndicator.forNumber(loadIndicator_); + return result == null ? com.google.apps.card.v1.Action.LoadIndicator.UNRECOGNIZED : result; + } + + public static final int PERSIST_VALUES_FIELD_NUMBER = 4; + private boolean persistValues_ = false; + + /** + * + * + *
+   * Indicates whether form values persist after the action. The default value
+   * is `false`.
+   *
+   * If `true`, form values remain after the action is triggered. To let the
+   * user make changes while the action is being processed, set
+   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+   * to `NONE`. For [card
+   * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
+   * in Chat apps, you must also set the action's
+   * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
+   * to `UPDATE_MESSAGE` and use the same
+   * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+   * from the card that contained the action.
+   *
+   * If `false`, the form values are cleared when the action is triggered.
+   * To prevent the user from making changes while the action is being
+   * processed, set
+   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+   * to `SPINNER`.
+   * 
+ * + * bool persist_values = 4; + * + * @return The persistValues. + */ + @java.lang.Override + public boolean getPersistValues() { + return persistValues_; + } + + public static final int INTERACTION_FIELD_NUMBER = 5; + private int interaction_ = 0; + + /** + * + * + *
+   * Optional. Required when opening a
+   * [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * What to do in response to an interaction with a user, such as a user
+   * clicking a button in a card message.
+   *
+   * If unspecified, the app responds by executing an `action`—like opening a
+   * link or running a function—as normal.
+   *
+   * By specifying an `interaction`, the app can respond in special interactive
+   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+   * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+   * specified, a loading indicator isn't shown. If specified for
+   * an add-on, the entire card is stripped and nothing is shown in the client.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The enum numeric value on the wire for interaction. + */ + @java.lang.Override + public int getInteractionValue() { + return interaction_; + } + + /** + * + * + *
+   * Optional. Required when opening a
+   * [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * What to do in response to an interaction with a user, such as a user
+   * clicking a button in a card message.
+   *
+   * If unspecified, the app responds by executing an `action`—like opening a
+   * link or running a function—as normal.
+   *
+   * By specifying an `interaction`, the app can respond in special interactive
+   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+   * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+   * specified, a loading indicator isn't shown. If specified for
+   * an add-on, the entire card is stripped and nothing is shown in the client.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The interaction. + */ + @java.lang.Override + public com.google.apps.card.v1.Action.Interaction getInteraction() { + com.google.apps.card.v1.Action.Interaction result = + com.google.apps.card.v1.Action.Interaction.forNumber(interaction_); + return result == null ? com.google.apps.card.v1.Action.Interaction.UNRECOGNIZED : result; + } + + public static final int REQUIRED_WIDGETS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList requiredWidgets_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + public com.google.protobuf.ProtocolStringList getRequiredWidgetsList() { + return requiredWidgets_; + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + public int getRequiredWidgetsCount() { + return requiredWidgets_.size(); + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + public java.lang.String getRequiredWidgets(int index) { + return requiredWidgets_.get(index); + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + public com.google.protobuf.ByteString getRequiredWidgetsBytes(int index) { + return requiredWidgets_.getByteString(index); + } + + public static final int ALL_WIDGETS_ARE_REQUIRED_FIELD_NUMBER = 7; + private boolean allWidgetsAreRequired_ = false; + + /** + * + * + *
+   * Optional. If this is true, then all widgets are considered required by
+   * this action.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + @java.lang.Override + public boolean getAllWidgetsAreRequired() { + return allWidgetsAreRequired_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(function_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, function_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(2, parameters_.get(i)); + } + if (loadIndicator_ != com.google.apps.card.v1.Action.LoadIndicator.SPINNER.getNumber()) { + output.writeEnum(3, loadIndicator_); + } + if (persistValues_ != false) { + output.writeBool(4, persistValues_); + } + if (interaction_ + != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(5, interaction_); + } + for (int i = 0; i < requiredWidgets_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, requiredWidgets_.getRaw(i)); + } + if (allWidgetsAreRequired_ != false) { + output.writeBool(7, allWidgetsAreRequired_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(function_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, function_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); + } + if (loadIndicator_ != com.google.apps.card.v1.Action.LoadIndicator.SPINNER.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, loadIndicator_); + } + if (persistValues_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, persistValues_); + } + if (interaction_ + != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, interaction_); + } + { + int dataSize = 0; + for (int i = 0; i < requiredWidgets_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredWidgets_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredWidgetsList().size(); + } + if (allWidgetsAreRequired_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, allWidgetsAreRequired_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.apps.card.v1.Action)) { + return super.equals(obj); + } + com.google.apps.card.v1.Action other = (com.google.apps.card.v1.Action) obj; + + if (!getFunction().equals(other.getFunction())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (loadIndicator_ != other.loadIndicator_) return false; + if (getPersistValues() != other.getPersistValues()) return false; + if (interaction_ != other.interaction_) return false; + if (!getRequiredWidgetsList().equals(other.getRequiredWidgetsList())) return false; + if (getAllWidgetsAreRequired() != other.getAllWidgetsAreRequired()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getFunction().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (37 * hash) + LOAD_INDICATOR_FIELD_NUMBER; + hash = (53 * hash) + loadIndicator_; + hash = (37 * hash) + PERSIST_VALUES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPersistValues()); + hash = (37 * hash) + INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + interaction_; + if (getRequiredWidgetsCount() > 0) { + hash = (37 * hash) + REQUIRED_WIDGETS_FIELD_NUMBER; + hash = (53 * hash) + getRequiredWidgetsList().hashCode(); + } + hash = (37 * hash) + ALL_WIDGETS_ARE_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllWidgetsAreRequired()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Action parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Action parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Action parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Action parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Action parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.apps.card.v1.Action prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An action that describes the behavior when the form is submitted.
+   * For example, you can invoke an Apps Script script to handle the form.
+   * If the action is triggered, the form values are sent to the server.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Action} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Action) + com.google.apps.card.v1.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Action.class, com.google.apps.card.v1.Action.Builder.class); + } + + // Construct using com.google.apps.card.v1.Action.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + function_ = ""; + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + } else { + parameters_ = null; + parametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + loadIndicator_ = 0; + persistValues_ = false; + interaction_ = 0; + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allWidgetsAreRequired_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Action_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Action getDefaultInstanceForType() { + return com.google.apps.card.v1.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Action build() { + com.google.apps.card.v1.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Action buildPartial() { + com.google.apps.card.v1.Action result = new com.google.apps.card.v1.Action(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.apps.card.v1.Action result) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.apps.card.v1.Action result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.function_ = function_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.loadIndicator_ = loadIndicator_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.persistValues_ = persistValues_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.interaction_ = interaction_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + requiredWidgets_.makeImmutable(); + result.requiredWidgets_ = requiredWidgets_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.allWidgetsAreRequired_ = allWidgetsAreRequired_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.apps.card.v1.Action) { + return mergeFrom((com.google.apps.card.v1.Action) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Action other) { + if (other == com.google.apps.card.v1.Action.getDefaultInstance()) return this; + if (!other.getFunction().isEmpty()) { + function_ = other.function_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + parametersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (other.loadIndicator_ != 0) { + setLoadIndicatorValue(other.getLoadIndicatorValue()); + } + if (other.getPersistValues() != false) { + setPersistValues(other.getPersistValues()); + } + if (other.interaction_ != 0) { + setInteractionValue(other.getInteractionValue()); + } + if (!other.requiredWidgets_.isEmpty()) { + if (requiredWidgets_.isEmpty()) { + requiredWidgets_ = other.requiredWidgets_; + bitField0_ |= 0x00000020; + } else { + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.addAll(other.requiredWidgets_); + } + onChanged(); + } + if (other.getAllWidgetsAreRequired() != false) { + setAllWidgetsAreRequired(other.getAllWidgetsAreRequired()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + function_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.apps.card.v1.Action.ActionParameter m = + input.readMessage( + com.google.apps.card.v1.Action.ActionParameter.parser(), extensionRegistry); + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(m); + } else { + parametersBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + loadIndicator_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + persistValues_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + interaction_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(s); + break; + } // case 50 + case 56: + { + allWidgetsAreRequired_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object function_ = ""; + + /** + * + * + *
+     * A custom function to invoke when the containing element is
+     * clicked or otherwise activated.
+     *
+     * For example usage, see [Read form
+     * data](https://developers.google.com/workspace/chat/read-form-data).
+     * 
+ * + * string function = 1; + * + * @return The function. + */ + public java.lang.String getFunction() { + java.lang.Object ref = function_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + function_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A custom function to invoke when the containing element is
+     * clicked or otherwise activated.
+     *
+     * For example usage, see [Read form
+     * data](https://developers.google.com/workspace/chat/read-form-data).
+     * 
+ * + * string function = 1; + * + * @return The bytes for function. + */ + public com.google.protobuf.ByteString getFunctionBytes() { + java.lang.Object ref = function_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + function_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A custom function to invoke when the containing element is
+     * clicked or otherwise activated.
+     *
+     * For example usage, see [Read form
+     * data](https://developers.google.com/workspace/chat/read-form-data).
+     * 
+ * + * string function = 1; + * + * @param value The function to set. + * @return This builder for chaining. + */ + public Builder setFunction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + function_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A custom function to invoke when the containing element is
+     * clicked or otherwise activated.
+     *
+     * For example usage, see [Read form
+     * data](https://developers.google.com/workspace/chat/read-form-data).
+     * 
+ * + * string function = 1; + * + * @return This builder for chaining. + */ + public Builder clearFunction() { + function_ = getDefaultInstance().getFunction(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * A custom function to invoke when the containing element is
+     * clicked or otherwise activated.
+     *
+     * For example usage, see [Read form
+     * data](https://developers.google.com/workspace/chat/read-form-data).
+     * 
+ * + * string function = 1; + * + * @param value The bytes for function to set. + * @return This builder for chaining. + */ + public Builder setFunctionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + function_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameters_ = + new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.apps.card.v1.Action.ActionParameter, + com.google.apps.card.v1.Action.ActionParameter.Builder, + com.google.apps.card.v1.Action.ActionParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public com.google.apps.card.v1.Action.ActionParameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder setParameters(int index, com.google.apps.card.v1.Action.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder setParameters( + int index, com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder addParameters(com.google.apps.card.v1.Action.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder addParameters(int index, com.google.apps.card.v1.Action.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder addParameters( + com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder addParameters( + int index, com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public com.google.apps.card.v1.Action.ActionParameter.Builder getParametersBuilder(int index) { + return internalGetParametersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public com.google.apps.card.v1.Action.ActionParameter.Builder addParametersBuilder() { + return internalGetParametersFieldBuilder() + .addBuilder(com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()); + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public com.google.apps.card.v1.Action.ActionParameter.Builder addParametersBuilder(int index) { + return internalGetParametersFieldBuilder() + .addBuilder(index, com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()); + } + + /** + * + * + *
+     * List of action parameters.
+     * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + public java.util.List + getParametersBuilderList() { + return internalGetParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.apps.card.v1.Action.ActionParameter, + com.google.apps.card.v1.Action.ActionParameter.Builder, + com.google.apps.card.v1.Action.ActionParameterOrBuilder> + internalGetParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.apps.card.v1.Action.ActionParameter, + com.google.apps.card.v1.Action.ActionParameter.Builder, + com.google.apps.card.v1.Action.ActionParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private int loadIndicator_ = 0; + + /** + * + * + *
+     * Specifies the loading indicator that the action displays while
+     * making the call to the action.
+     * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The enum numeric value on the wire for loadIndicator. + */ + @java.lang.Override + public int getLoadIndicatorValue() { + return loadIndicator_; + } + + /** + * + * + *
+     * Specifies the loading indicator that the action displays while
+     * making the call to the action.
+     * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @param value The enum numeric value on the wire for loadIndicator to set. + * @return This builder for chaining. + */ + public Builder setLoadIndicatorValue(int value) { + loadIndicator_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the loading indicator that the action displays while
+     * making the call to the action.
+     * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The loadIndicator. + */ + @java.lang.Override + public com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator() { + com.google.apps.card.v1.Action.LoadIndicator result = + com.google.apps.card.v1.Action.LoadIndicator.forNumber(loadIndicator_); + return result == null ? com.google.apps.card.v1.Action.LoadIndicator.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Specifies the loading indicator that the action displays while
+     * making the call to the action.
+     * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @param value The loadIndicator to set. + * @return This builder for chaining. + */ + public Builder setLoadIndicator(com.google.apps.card.v1.Action.LoadIndicator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + loadIndicator_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the loading indicator that the action displays while
+     * making the call to the action.
+     * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return This builder for chaining. + */ + public Builder clearLoadIndicator() { + bitField0_ = (bitField0_ & ~0x00000004); + loadIndicator_ = 0; + onChanged(); + return this; + } + + private boolean persistValues_; + + /** + * + * + *
+     * Indicates whether form values persist after the action. The default value
+     * is `false`.
+     *
+     * If `true`, form values remain after the action is triggered. To let the
+     * user make changes while the action is being processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `NONE`. For [card
+     * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
+     * in Chat apps, you must also set the action's
+     * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
+     * to `UPDATE_MESSAGE` and use the same
+     * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+     * from the card that contained the action.
+     *
+     * If `false`, the form values are cleared when the action is triggered.
+     * To prevent the user from making changes while the action is being
+     * processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `SPINNER`.
+     * 
+ * + * bool persist_values = 4; + * + * @return The persistValues. + */ + @java.lang.Override + public boolean getPersistValues() { + return persistValues_; + } + + /** + * + * + *
+     * Indicates whether form values persist after the action. The default value
+     * is `false`.
+     *
+     * If `true`, form values remain after the action is triggered. To let the
+     * user make changes while the action is being processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `NONE`. For [card
+     * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
+     * in Chat apps, you must also set the action's
+     * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
+     * to `UPDATE_MESSAGE` and use the same
+     * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+     * from the card that contained the action.
+     *
+     * If `false`, the form values are cleared when the action is triggered.
+     * To prevent the user from making changes while the action is being
+     * processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `SPINNER`.
+     * 
+ * + * bool persist_values = 4; + * + * @param value The persistValues to set. + * @return This builder for chaining. + */ + public Builder setPersistValues(boolean value) { + + persistValues_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether form values persist after the action. The default value
+     * is `false`.
+     *
+     * If `true`, form values remain after the action is triggered. To let the
+     * user make changes while the action is being processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `NONE`. For [card
+     * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
+     * in Chat apps, you must also set the action's
+     * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
+     * to `UPDATE_MESSAGE` and use the same
+     * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+     * from the card that contained the action.
+     *
+     * If `false`, the form values are cleared when the action is triggered.
+     * To prevent the user from making changes while the action is being
+     * processed, set
+     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+     * to `SPINNER`.
+     * 
+ * + * bool persist_values = 4; + * + * @return This builder for chaining. + */ + public Builder clearPersistValues() { + bitField0_ = (bitField0_ & ~0x00000008); + persistValues_ = false; + onChanged(); + return this; + } + + private int interaction_ = 0; + + /** + * + * + *
+     * Optional. Required when opening a
+     * [dialog](https://developers.google.com/workspace/chat/dialogs).
+     *
+     * What to do in response to an interaction with a user, such as a user
+     * clicking a button in a card message.
+     *
+     * If unspecified, the app responds by executing an `action`—like opening a
+     * link or running a function—as normal.
+     *
+     * By specifying an `interaction`, the app can respond in special interactive
+     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+     * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+     * specified, a loading indicator isn't shown. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The enum numeric value on the wire for interaction. + */ + @java.lang.Override + public int getInteractionValue() { + return interaction_; + } + + /** + * + * + *
+     * Optional. Required when opening a
+     * [dialog](https://developers.google.com/workspace/chat/dialogs).
+     *
+     * What to do in response to an interaction with a user, such as a user
+     * clicking a button in a card message.
+     *
+     * If unspecified, the app responds by executing an `action`—like opening a
+     * link or running a function—as normal.
+     *
+     * By specifying an `interaction`, the app can respond in special interactive
+     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+     * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+     * specified, a loading indicator isn't shown. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @param value The enum numeric value on the wire for interaction to set. + * @return This builder for chaining. + */ + public Builder setInteractionValue(int value) { + interaction_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Required when opening a
+     * [dialog](https://developers.google.com/workspace/chat/dialogs).
+     *
+     * What to do in response to an interaction with a user, such as a user
+     * clicking a button in a card message.
+     *
+     * If unspecified, the app responds by executing an `action`—like opening a
+     * link or running a function—as normal.
+     *
+     * By specifying an `interaction`, the app can respond in special interactive
+     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+     * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+     * specified, a loading indicator isn't shown. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The interaction. + */ + @java.lang.Override + public com.google.apps.card.v1.Action.Interaction getInteraction() { + com.google.apps.card.v1.Action.Interaction result = + com.google.apps.card.v1.Action.Interaction.forNumber(interaction_); + return result == null ? com.google.apps.card.v1.Action.Interaction.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. Required when opening a
+     * [dialog](https://developers.google.com/workspace/chat/dialogs).
+     *
+     * What to do in response to an interaction with a user, such as a user
+     * clicking a button in a card message.
+     *
+     * If unspecified, the app responds by executing an `action`—like opening a
+     * link or running a function—as normal.
+     *
+     * By specifying an `interaction`, the app can respond in special interactive
+     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+     * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+     * specified, a loading indicator isn't shown. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @param value The interaction to set. + * @return This builder for chaining. + */ + public Builder setInteraction(com.google.apps.card.v1.Action.Interaction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + interaction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Required when opening a
+     * [dialog](https://developers.google.com/workspace/chat/dialogs).
+     *
+     * What to do in response to an interaction with a user, such as a user
+     * clicking a button in a card message.
+     *
+     * If unspecified, the app responds by executing an `action`—like opening a
+     * link or running a function—as normal.
+     *
+     * By specifying an `interaction`, the app can respond in special interactive
+     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+     * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+     * specified, a loading indicator isn't shown. If specified for
+     * an add-on, the entire card is stripped and nothing is shown in the client.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return This builder for chaining. + */ + public Builder clearInteraction() { + bitField0_ = (bitField0_ & ~0x00000010); + interaction_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList requiredWidgets_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredWidgetsIsMutable() { + if (!requiredWidgets_.isModifiable()) { + requiredWidgets_ = new com.google.protobuf.LazyStringArrayList(requiredWidgets_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + public com.google.protobuf.ProtocolStringList getRequiredWidgetsList() { + requiredWidgets_.makeImmutable(); + return requiredWidgets_; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + public int getRequiredWidgetsCount() { + return requiredWidgets_.size(); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + public java.lang.String getRequiredWidgets(int index) { + return requiredWidgets_.get(index); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + public com.google.protobuf.ByteString getRequiredWidgetsBytes(int index) { + return requiredWidgets_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index to set the value at. + * @param value The requiredWidgets to set. + * @return This builder for chaining. + */ + public Builder setRequiredWidgets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param value The requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addRequiredWidgets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param values The requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredWidgets(java.lang.Iterable values) { + ensureRequiredWidgetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredWidgets_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequiredWidgets() { + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param value The bytes of the requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addRequiredWidgetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean allWidgetsAreRequired_; + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + @java.lang.Override + public boolean getAllWidgetsAreRequired() { + return allWidgetsAreRequired_; + } + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @param value The allWidgetsAreRequired to set. + * @return This builder for chaining. + */ + public Builder setAllWidgetsAreRequired(boolean value) { + + allWidgetsAreRequired_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @return This builder for chaining. + */ + public Builder clearAllWidgetsAreRequired() { + bitField0_ = (bitField0_ & ~0x00000040); + allWidgetsAreRequired_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Action) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Action) + private static final com.google.apps.card.v1.Action DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Action(); + } + + public static com.google.apps.card.v1.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.apps.card.v1.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java new file mode 100644 index 000000000000..f42588abde44 --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java @@ -0,0 +1,332 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/apps/card/v1/card.proto +// Protobuf Java Version: 4.33.2 + +package com.google.apps.card.v1; + +@com.google.protobuf.Generated +public interface ActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Action) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A custom function to invoke when the containing element is
+   * clicked or otherwise activated.
+   *
+   * For example usage, see [Read form
+   * data](https://developers.google.com/workspace/chat/read-form-data).
+   * 
+ * + * string function = 1; + * + * @return The function. + */ + java.lang.String getFunction(); + + /** + * + * + *
+   * A custom function to invoke when the containing element is
+   * clicked or otherwise activated.
+   *
+   * For example usage, see [Read form
+   * data](https://developers.google.com/workspace/chat/read-form-data).
+   * 
+ * + * string function = 1; + * + * @return The bytes for function. + */ + com.google.protobuf.ByteString getFunctionBytes(); + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + java.util.List getParametersList(); + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + com.google.apps.card.v1.Action.ActionParameter getParameters(int index); + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + int getParametersCount(); + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + java.util.List + getParametersOrBuilderList(); + + /** + * + * + *
+   * List of action parameters.
+   * 
+ * + * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder(int index); + + /** + * + * + *
+   * Specifies the loading indicator that the action displays while
+   * making the call to the action.
+   * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The enum numeric value on the wire for loadIndicator. + */ + int getLoadIndicatorValue(); + + /** + * + * + *
+   * Specifies the loading indicator that the action displays while
+   * making the call to the action.
+   * 
+ * + * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * + * @return The loadIndicator. + */ + com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator(); + + /** + * + * + *
+   * Indicates whether form values persist after the action. The default value
+   * is `false`.
+   *
+   * If `true`, form values remain after the action is triggered. To let the
+   * user make changes while the action is being processed, set
+   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+   * to `NONE`. For [card
+   * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
+   * in Chat apps, you must also set the action's
+   * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
+   * to `UPDATE_MESSAGE` and use the same
+   * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+   * from the card that contained the action.
+   *
+   * If `false`, the form values are cleared when the action is triggered.
+   * To prevent the user from making changes while the action is being
+   * processed, set
+   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
+   * to `SPINNER`.
+   * 
+ * + * bool persist_values = 4; + * + * @return The persistValues. + */ + boolean getPersistValues(); + + /** + * + * + *
+   * Optional. Required when opening a
+   * [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * What to do in response to an interaction with a user, such as a user
+   * clicking a button in a card message.
+   *
+   * If unspecified, the app responds by executing an `action`—like opening a
+   * link or running a function—as normal.
+   *
+   * By specifying an `interaction`, the app can respond in special interactive
+   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+   * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+   * specified, a loading indicator isn't shown. If specified for
+   * an add-on, the entire card is stripped and nothing is shown in the client.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The enum numeric value on the wire for interaction. + */ + int getInteractionValue(); + + /** + * + * + *
+   * Optional. Required when opening a
+   * [dialog](https://developers.google.com/workspace/chat/dialogs).
+   *
+   * What to do in response to an interaction with a user, such as a user
+   * clicking a button in a card message.
+   *
+   * If unspecified, the app responds by executing an `action`—like opening a
+   * link or running a function—as normal.
+   *
+   * By specifying an `interaction`, the app can respond in special interactive
+   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
+   * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
+   * specified, a loading indicator isn't shown. If specified for
+   * an add-on, the entire card is stripped and nothing is shown in the client.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Action.Interaction interaction = 5; + * + * @return The interaction. + */ + com.google.apps.card.v1.Action.Interaction getInteraction(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + java.util.List getRequiredWidgetsList(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + int getRequiredWidgetsCount(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + java.lang.String getRequiredWidgets(int index); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + com.google.protobuf.ByteString getRequiredWidgetsBytes(int index); + + /** + * + * + *
+   * Optional. If this is true, then all widgets are considered required by
+   * this action.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + boolean getAllWidgetsAreRequired(); +} diff --git a/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java new file mode 100644 index 000000000000..98a20743a27c --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java @@ -0,0 +1,1346 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/apps/card/v1/card.proto +// Protobuf Java Version: 4.33.2 + +package com.google.apps.card.v1; + +/** + * + * + *
+ * The style options for the border of a card or widget, including the border
+ * type and color.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.BorderStyle} + */ +@com.google.protobuf.Generated +public final class BorderStyle extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.BorderStyle) + BorderStyleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BorderStyle"); + } + + // Use BorderStyle.newBuilder() to construct. + private BorderStyle(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BorderStyle() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_BorderStyle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.BorderStyle.class, + com.google.apps.card.v1.BorderStyle.Builder.class); + } + + /** + * + * + *
+   * Represents the border types applied to widgets.
+   *
+   * [Google Workspace add-ons
+   * and Chat apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.BorderStyle.BorderType} + */ + public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * BORDER_TYPE_UNSPECIFIED = 0; + */ + BORDER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * No border.
+     * 
+ * + * NO_BORDER = 1; + */ + NO_BORDER(1), + /** + * + * + *
+     * Default value. Outline.
+     * 
+ * + * STROKE = 2; + */ + STROKE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BorderType"); + } + + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * BORDER_TYPE_UNSPECIFIED = 0; + */ + public static final int BORDER_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * No border.
+     * 
+ * + * NO_BORDER = 1; + */ + public static final int NO_BORDER_VALUE = 1; + + /** + * + * + *
+     * Default value. Outline.
+     * 
+ * + * STROKE = 2; + */ + public static final int STROKE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BorderType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BorderType forNumber(int value) { + switch (value) { + case 0: + return BORDER_TYPE_UNSPECIFIED; + case 1: + return NO_BORDER; + case 2: + return STROKE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BorderType findValueByNumber(int number) { + return BorderType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.apps.card.v1.BorderStyle.getDescriptor().getEnumTypes().get(0); + } + + private static final BorderType[] VALUES = values(); + + public static BorderType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BorderType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.BorderStyle.BorderType) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * The border type.
+   * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * The border type.
+   * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.BorderStyle.BorderType getType() { + com.google.apps.card.v1.BorderStyle.BorderType result = + com.google.apps.card.v1.BorderStyle.BorderType.forNumber(type_); + return result == null ? com.google.apps.card.v1.BorderStyle.BorderType.UNRECOGNIZED : result; + } + + public static final int STROKE_COLOR_FIELD_NUMBER = 2; + private com.google.type.Color strokeColor_; + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return Whether the strokeColor field is set. + */ + @java.lang.Override + public boolean hasStrokeColor() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return The strokeColor. + */ + @java.lang.Override + public com.google.type.Color getStrokeColor() { + return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; + } + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getStrokeColorOrBuilder() { + return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; + } + + public static final int CORNER_RADIUS_FIELD_NUMBER = 3; + private int cornerRadius_ = 0; + + /** + * + * + *
+   * The corner radius for the border.
+   * 
+ * + * int32 corner_radius = 3; + * + * @return The cornerRadius. + */ + @java.lang.Override + public int getCornerRadius() { + return cornerRadius_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.apps.card.v1.BorderStyle.BorderType.BORDER_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStrokeColor()); + } + if (cornerRadius_ != 0) { + output.writeInt32(3, cornerRadius_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.apps.card.v1.BorderStyle.BorderType.BORDER_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStrokeColor()); + } + if (cornerRadius_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, cornerRadius_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.apps.card.v1.BorderStyle)) { + return super.equals(obj); + } + com.google.apps.card.v1.BorderStyle other = (com.google.apps.card.v1.BorderStyle) obj; + + if (type_ != other.type_) return false; + if (hasStrokeColor() != other.hasStrokeColor()) return false; + if (hasStrokeColor()) { + if (!getStrokeColor().equals(other.getStrokeColor())) return false; + } + if (getCornerRadius() != other.getCornerRadius()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasStrokeColor()) { + hash = (37 * hash) + STROKE_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getStrokeColor().hashCode(); + } + hash = (37 * hash) + CORNER_RADIUS_FIELD_NUMBER; + hash = (53 * hash) + getCornerRadius(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.BorderStyle parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.BorderStyle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.BorderStyle parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.BorderStyle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.apps.card.v1.BorderStyle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The style options for the border of a card or widget, including the border
+   * type and color.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.BorderStyle} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.BorderStyle) + com.google.apps.card.v1.BorderStyleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_BorderStyle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.BorderStyle.class, + com.google.apps.card.v1.BorderStyle.Builder.class); + } + + // Construct using com.google.apps.card.v1.BorderStyle.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStrokeColorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + strokeColor_ = null; + if (strokeColorBuilder_ != null) { + strokeColorBuilder_.dispose(); + strokeColorBuilder_ = null; + } + cornerRadius_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_BorderStyle_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.BorderStyle getDefaultInstanceForType() { + return com.google.apps.card.v1.BorderStyle.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.BorderStyle build() { + com.google.apps.card.v1.BorderStyle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.BorderStyle buildPartial() { + com.google.apps.card.v1.BorderStyle result = new com.google.apps.card.v1.BorderStyle(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.BorderStyle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.strokeColor_ = + strokeColorBuilder_ == null ? strokeColor_ : strokeColorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cornerRadius_ = cornerRadius_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.apps.card.v1.BorderStyle) { + return mergeFrom((com.google.apps.card.v1.BorderStyle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.BorderStyle other) { + if (other == com.google.apps.card.v1.BorderStyle.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasStrokeColor()) { + mergeStrokeColor(other.getStrokeColor()); + } + if (other.getCornerRadius() != 0) { + setCornerRadius(other.getCornerRadius()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetStrokeColorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + cornerRadius_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + + /** + * + * + *
+     * The border type.
+     * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * The border type.
+     * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The border type.
+     * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.BorderStyle.BorderType getType() { + com.google.apps.card.v1.BorderStyle.BorderType result = + com.google.apps.card.v1.BorderStyle.BorderType.forNumber(type_); + return result == null ? com.google.apps.card.v1.BorderStyle.BorderType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The border type.
+     * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.apps.card.v1.BorderStyle.BorderType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The border type.
+     * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.type.Color strokeColor_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + strokeColorBuilder_; + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return Whether the strokeColor field is set. + */ + public boolean hasStrokeColor() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return The strokeColor. + */ + public com.google.type.Color getStrokeColor() { + if (strokeColorBuilder_ == null) { + return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; + } else { + return strokeColorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public Builder setStrokeColor(com.google.type.Color value) { + if (strokeColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + strokeColor_ = value; + } else { + strokeColorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public Builder setStrokeColor(com.google.type.Color.Builder builderForValue) { + if (strokeColorBuilder_ == null) { + strokeColor_ = builderForValue.build(); + } else { + strokeColorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public Builder mergeStrokeColor(com.google.type.Color value) { + if (strokeColorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && strokeColor_ != null + && strokeColor_ != com.google.type.Color.getDefaultInstance()) { + getStrokeColorBuilder().mergeFrom(value); + } else { + strokeColor_ = value; + } + } else { + strokeColorBuilder_.mergeFrom(value); + } + if (strokeColor_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public Builder clearStrokeColor() { + bitField0_ = (bitField0_ & ~0x00000002); + strokeColor_ = null; + if (strokeColorBuilder_ != null) { + strokeColorBuilder_.dispose(); + strokeColorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public com.google.type.Color.Builder getStrokeColorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStrokeColorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + public com.google.type.ColorOrBuilder getStrokeColorOrBuilder() { + if (strokeColorBuilder_ != null) { + return strokeColorBuilder_.getMessageOrBuilder(); + } else { + return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; + } + } + + /** + * + * + *
+     * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color stroke_color = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + internalGetStrokeColorFieldBuilder() { + if (strokeColorBuilder_ == null) { + strokeColorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, + com.google.type.Color.Builder, + com.google.type.ColorOrBuilder>( + getStrokeColor(), getParentForChildren(), isClean()); + strokeColor_ = null; + } + return strokeColorBuilder_; + } + + private int cornerRadius_; + + /** + * + * + *
+     * The corner radius for the border.
+     * 
+ * + * int32 corner_radius = 3; + * + * @return The cornerRadius. + */ + @java.lang.Override + public int getCornerRadius() { + return cornerRadius_; + } + + /** + * + * + *
+     * The corner radius for the border.
+     * 
+ * + * int32 corner_radius = 3; + * + * @param value The cornerRadius to set. + * @return This builder for chaining. + */ + public Builder setCornerRadius(int value) { + + cornerRadius_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The corner radius for the border.
+     * 
+ * + * int32 corner_radius = 3; + * + * @return This builder for chaining. + */ + public Builder clearCornerRadius() { + bitField0_ = (bitField0_ & ~0x00000004); + cornerRadius_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.apps.card.v1.BorderStyle) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.BorderStyle) + private static final com.google.apps.card.v1.BorderStyle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.BorderStyle(); + } + + public static com.google.apps.card.v1.BorderStyle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BorderStyle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.apps.card.v1.BorderStyle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java new file mode 100644 index 000000000000..a0f7bb69f9fb --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/apps/card/v1/card.proto +// Protobuf Java Version: 4.33.2 + +package com.google.apps.card.v1; + +@com.google.protobuf.Generated +public interface BorderStyleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.BorderStyle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The border type.
+   * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * The border type.
+   * 
+ * + * .google.apps.card.v1.BorderStyle.BorderType type = 1; + * + * @return The type. + */ + com.google.apps.card.v1.BorderStyle.BorderType getType(); + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return Whether the strokeColor field is set. + */ + boolean hasStrokeColor(); + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + * + * @return The strokeColor. + */ + com.google.type.Color getStrokeColor(); + + /** + * + * + *
+   * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color stroke_color = 2; + */ + com.google.type.ColorOrBuilder getStrokeColorOrBuilder(); + + /** + * + * + *
+   * The corner radius for the border.
+   * 
+ * + * int32 corner_radius = 3; + * + * @return The cornerRadius. + */ + int getCornerRadius(); +} diff --git a/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Button.java b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Button.java new file mode 100644 index 000000000000..6f2062964ded --- /dev/null +++ b/java-common-protos/proto-proto-google-common-protos-v1/src/main/java/com/google/apps/card/v1/Button.java @@ -0,0 +1,2450 @@ +/* + * Copyright 2026 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/apps/card/v1/card.proto +// Protobuf Java Version: 4.33.2 + +package com.google.apps.card.v1; + +/** + * + * + *
+ * A text, icon, or text and icon button that users can click. For an example in
+ * Google Chat apps, see
+ * [Add a
+ * button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
+ *
+ * To make an image a clickable button, specify an
+ * [`Image`][google.apps.card.v1.Image] (not an
+ * [`ImageComponent`][google.apps.card.v1.ImageComponent]) and set an
+ * `onClick` action.
+ *
+ * [Google Workspace
+ * add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.Button} + */ +@com.google.protobuf.Generated +public final class Button extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Button) + ButtonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Button"); + } + + // Use Button.newBuilder() to construct. + private Button(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Button() { + text_ = ""; + altText_ = ""; + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Button_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Button_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class); + } + + /** + * + * + *
+   * Optional. The
+   * [type](https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05)
+   * of a button. If `color` field is set, the `type` is forced to `FILLED`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Button.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Outlined buttons are medium-emphasis buttons. They usually contain
+     * actions that are important, but aren’t the primary action in a Chat app
+     * or an add-on.
+     * 
+ * + * OUTLINED = 1; + */ + OUTLINED(1), + /** + * + * + *
+     * A filled button has a container with a solid color. It has the most
+     * visual impact and is recommended for the important and primary action in
+     * a Chat app or an add-on.
+     * 
+ * + * FILLED = 2; + */ + FILLED(2), + /** + * + * + *
+     * A filled tonal button is an alternative middle ground between filled and
+     * outlined buttons. They’re useful in contexts where a lower-priority
+     * button requires slightly more emphasis than an outline button would give.
+     * 
+ * + * FILLED_TONAL = 3; + */ + FILLED_TONAL(3), + /** + * + * + *
+     * A button does not have an invisible container in its default state. It is
+     * often used for the lowest priority actions, especially when presenting
+     * multiple options.
+     * 
+ * + * BORDERLESS = 4; + */ + BORDERLESS(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Outlined buttons are medium-emphasis buttons. They usually contain
+     * actions that are important, but aren’t the primary action in a Chat app
+     * or an add-on.
+     * 
+ * + * OUTLINED = 1; + */ + public static final int OUTLINED_VALUE = 1; + + /** + * + * + *
+     * A filled button has a container with a solid color. It has the most
+     * visual impact and is recommended for the important and primary action in
+     * a Chat app or an add-on.
+     * 
+ * + * FILLED = 2; + */ + public static final int FILLED_VALUE = 2; + + /** + * + * + *
+     * A filled tonal button is an alternative middle ground between filled and
+     * outlined buttons. They’re useful in contexts where a lower-priority
+     * button requires slightly more emphasis than an outline button would give.
+     * 
+ * + * FILLED_TONAL = 3; + */ + public static final int FILLED_TONAL_VALUE = 3; + + /** + * + * + *
+     * A button does not have an invisible container in its default state. It is
+     * often used for the lowest priority actions, especially when presenting
+     * multiple options.
+     * 
+ * + * BORDERLESS = 4; + */ + public static final int BORDERLESS_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return OUTLINED; + case 2: + return FILLED; + case 3: + return FILLED_TONAL; + case 4: + return BORDERLESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.apps.card.v1.Button.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Button.Type) + } + + private int bitField0_; + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+   * The text displayed inside the button.
+   * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + + /** + * + * + *
+   * The text displayed inside the button.
+   * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICON_FIELD_NUMBER = 2; + private com.google.apps.card.v1.Icon icon_; + + /** + * + * + *
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 2; + * + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 2; + * + * @return The icon. + */ + @java.lang.Override + public com.google.apps.card.v1.Icon getIcon() { + return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; + } + + /** + * + * + *
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { + return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; + } + + public static final int COLOR_FIELD_NUMBER = 3; + private com.google.type.Color color_; + + /** + * + * + *
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
+   *
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color color = 3; + * + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
+   *
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color color = 3; + * + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + + /** + * + * + *
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
+   *
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   * "red": 1,
+   * "green": 0,
+   * "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
+   * 
+ * + * .google.type.Color color = 3; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + + public static final int ON_CLICK_FIELD_NUMBER = 4; + private com.google.apps.card.v1.OnClick onClick_; + + /** + * + * + *
+   * Required. The action to perform when a user clicks the button, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + * + * @return Whether the onClick field is set. + */ + @java.lang.Override + public boolean hasOnClick() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. The action to perform when a user clicks the button, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + * + * @return The onClick. + */ + @java.lang.Override + public com.google.apps.card.v1.OnClick getOnClick() { + return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; + } + + /** + * + * + *
+   * Required. The action to perform when a user clicks the button, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + @java.lang.Override + public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() { + return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; + } + + public static final int DISABLED_FIELD_NUMBER = 5; + private boolean disabled_ = false; + + /** + * + * + *
+   * If `true`, the button is displayed in an inactive state and doesn't respond
+   * to user actions.
+   * 
+ * + * bool disabled = 5; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + public static final int ALT_TEXT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object altText_ = ""; + + /** + * + * + *
+   * The alternative text that's used for accessibility.
+   *
+   * Set descriptive text that lets users know what the button does. For
+   * example, if a button opens a hyperlink, you might write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 6; + * + * @return The altText. + */ + @java.lang.Override + public java.lang.String getAltText() { + java.lang.Object ref = altText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + altText_ = s; + return s; + } + } + + /** + * + * + *
+   * The alternative text that's used for accessibility.
+   *
+   * Set descriptive text that lets users know what the button does. For
+   * example, if a button opens a hyperlink, you might write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 6; + * + * @return The bytes for altText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAltTextBytes() { + java.lang.Object ref = altText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + altText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 7; + private int type_ = 0; + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.Button.Type getType() { + com.google.apps.card.v1.Button.Type result = + com.google.apps.card.v1.Button.Type.forNumber(type_); + return result == null ? com.google.apps.card.v1.Button.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getIcon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getColor()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getOnClick()); + } + if (disabled_ != false) { + output.writeBool(5, disabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(altText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, altText_); + } + if (type_ != com.google.apps.card.v1.Button.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIcon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getColor()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOnClick()); + } + if (disabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, disabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(altText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, altText_); + } + if (type_ != com.google.apps.card.v1.Button.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.apps.card.v1.Button)) { + return super.equals(obj); + } + com.google.apps.card.v1.Button other = (com.google.apps.card.v1.Button) obj; + + if (!getText().equals(other.getText())) return false; + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon().equals(other.getIcon())) return false; + } + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor().equals(other.getColor())) return false; + } + if (hasOnClick() != other.hasOnClick()) return false; + if (hasOnClick()) { + if (!getOnClick().equals(other.getOnClick())) return false; + } + if (getDisabled() != other.getDisabled()) return false; + if (!getAltText().equals(other.getAltText())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + if (hasOnClick()) { + hash = (37 * hash) + ON_CLICK_FIELD_NUMBER; + hash = (53 * hash) + getOnClick().hashCode(); + } + hash = (37 * hash) + DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); + hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getAltText().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Button parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Button parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Button parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Button parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Button parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Button parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.apps.card.v1.Button parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Button parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Button parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Button parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.apps.card.v1.Button parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Button parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.apps.card.v1.Button prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A text, icon, or text and icon button that users can click. For an example in
+   * Google Chat apps, see
+   * [Add a
+   * button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
+   *
+   * To make an image a clickable button, specify an
+   * [`Image`][google.apps.card.v1.Image] (not an
+   * [`ImageComponent`][google.apps.card.v1.ImageComponent]) and set an
+   * `onClick` action.
+   *
+   * [Google Workspace
+   * add-ons and Chat apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Button} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Button) + com.google.apps.card.v1.ButtonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Button_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Button_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class); + } + + // Construct using com.google.apps.card.v1.Button.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIconFieldBuilder(); + internalGetColorFieldBuilder(); + internalGetOnClickFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + color_ = null; + if (colorBuilder_ != null) { + colorBuilder_.dispose(); + colorBuilder_ = null; + } + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + disabled_ = false; + altText_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Button_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Button getDefaultInstanceForType() { + return com.google.apps.card.v1.Button.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Button build() { + com.google.apps.card.v1.Button result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Button buildPartial() { + com.google.apps.card.v1.Button result = new com.google.apps.card.v1.Button(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.Button result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.icon_ = iconBuilder_ == null ? icon_ : iconBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.color_ = colorBuilder_ == null ? color_ : colorBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.disabled_ = disabled_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.altText_ = altText_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.apps.card.v1.Button) { + return mergeFrom((com.google.apps.card.v1.Button) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Button other) { + if (other == com.google.apps.card.v1.Button.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.hasOnClick()) { + mergeOnClick(other.getOnClick()); + } + if (other.getDisabled() != false) { + setDisabled(other.getDisabled()); + } + if (!other.getAltText().isEmpty()) { + altText_ = other.altText_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetIconFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetColorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetOnClickFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + altText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + + /** + * + * + *
+     * The text displayed inside the button.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The text displayed inside the button.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The text displayed inside the button.
+     * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The text displayed inside the button.
+     * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The text displayed inside the button.
+     * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.apps.card.v1.Icon icon_; + private com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder> + iconBuilder_; + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + * + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + * + * @return The icon. + */ + public com.google.apps.card.v1.Icon getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public Builder setIcon(com.google.apps.card.v1.Icon value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public Builder setIcon(com.google.apps.card.v1.Icon.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public Builder mergeIcon(com.google.apps.card.v1.Icon value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && icon_ != null + && icon_ != com.google.apps.card.v1.Icon.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + if (icon_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000002); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public com.google.apps.card.v1.Icon.Builder getIconBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetIconFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; + } + } + + /** + * + * + *
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
+     * 
+ * + * .google.apps.card.v1.Icon icon = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder> + internalGetIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder>( + getIcon(), getParentForChildren(), isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + colorBuilder_; + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + * + * @return Whether the color field is set. + */ + public boolean hasColor() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + * + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + } else { + colorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public Builder setColor(com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && color_ != null + && color_ != com.google.type.Color.getDefaultInstance()) { + getColorBuilder().mergeFrom(value); + } else { + color_ = value; + } + } else { + colorBuilder_.mergeFrom(value); + } + if (color_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000004); + color_ = null; + if (colorBuilder_ != null) { + colorBuilder_.dispose(); + colorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public com.google.type.Color.Builder getColorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetColorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + } + + /** + * + * + *
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
+     *
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     * "red": 1,
+     * "green": 0,
+     * "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
+     * 
+ * + * .google.type.Color color = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + internalGetColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Color, + com.google.type.Color.Builder, + com.google.type.ColorOrBuilder>(getColor(), getParentForChildren(), isClean()); + color_ = null; + } + return colorBuilder_; + } + + private com.google.apps.card.v1.OnClick onClick_; + private com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.OnClick, + com.google.apps.card.v1.OnClick.Builder, + com.google.apps.card.v1.OnClickOrBuilder> + onClickBuilder_; + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + * + * @return Whether the onClick field is set. + */ + public boolean hasOnClick() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + * + * @return The onClick. + */ + public com.google.apps.card.v1.OnClick getOnClick() { + if (onClickBuilder_ == null) { + return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; + } else { + return onClickBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public Builder setOnClick(com.google.apps.card.v1.OnClick value) { + if (onClickBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + onClick_ = value; + } else { + onClickBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) { + if (onClickBuilder_ == null) { + onClick_ = builderForValue.build(); + } else { + onClickBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { + if (onClickBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && onClick_ != null + && onClick_ != com.google.apps.card.v1.OnClick.getDefaultInstance()) { + getOnClickBuilder().mergeFrom(value); + } else { + onClick_ = value; + } + } else { + onClickBuilder_.mergeFrom(value); + } + if (onClick_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public Builder clearOnClick() { + bitField0_ = (bitField0_ & ~0x00000008); + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetOnClickFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() { + if (onClickBuilder_ != null) { + return onClickBuilder_.getMessageOrBuilder(); + } else { + return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; + } + } + + /** + * + * + *
+     * Required. The action to perform when a user clicks the button, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.OnClick, + com.google.apps.card.v1.OnClick.Builder, + com.google.apps.card.v1.OnClickOrBuilder> + internalGetOnClickFieldBuilder() { + if (onClickBuilder_ == null) { + onClickBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.apps.card.v1.OnClick, + com.google.apps.card.v1.OnClick.Builder, + com.google.apps.card.v1.OnClickOrBuilder>( + getOnClick(), getParentForChildren(), isClean()); + onClick_ = null; + } + return onClickBuilder_; + } + + private boolean disabled_; + + /** + * + * + *
+     * If `true`, the button is displayed in an inactive state and doesn't respond
+     * to user actions.
+     * 
+ * + * bool disabled = 5; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + /** + * + * + *
+     * If `true`, the button is displayed in an inactive state and doesn't respond
+     * to user actions.
+     * 
+ * + * bool disabled = 5; + * + * @param value The disabled to set. + * @return This builder for chaining. + */ + public Builder setDisabled(boolean value) { + + disabled_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * If `true`, the button is displayed in an inactive state and doesn't respond
+     * to user actions.
+     * 
+ * + * bool disabled = 5; + * + * @return This builder for chaining. + */ + public Builder clearDisabled() { + bitField0_ = (bitField0_ & ~0x00000010); + disabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object altText_ = ""; + + /** + * + * + *
+     * The alternative text that's used for accessibility.
+     *
+     * Set descriptive text that lets users know what the button does. For
+     * example, if a button opens a hyperlink, you might write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 6; + * + * @return The altText. + */ + public java.lang.String getAltText() { + java.lang.Object ref = altText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + altText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The alternative text that's used for accessibility.
+     *
+     * Set descriptive text that lets users know what the button does. For
+     * example, if a button opens a hyperlink, you might write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 6; + * + * @return The bytes for altText. + */ + public com.google.protobuf.ByteString getAltTextBytes() { + java.lang.Object ref = altText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + altText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The alternative text that's used for accessibility.
+     *
+     * Set descriptive text that lets users know what the button does. For
+     * example, if a button opens a hyperlink, you might write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 6; + * + * @param value The altText to set. + * @return This builder for chaining. + */ + public Builder setAltText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + altText_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The alternative text that's used for accessibility.
+     *
+     * Set descriptive text that lets users know what the button does. For
+     * example, if a button opens a hyperlink, you might write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 6; + * + * @return This builder for chaining. + */ + public Builder clearAltText() { + altText_ = getDefaultInstance().getAltText(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * The alternative text that's used for accessibility.
+     *
+     * Set descriptive text that lets users know what the button does. For
+     * example, if a button opens a hyperlink, you might write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 6; + * + * @param value The bytes for altText to set. + * @return This builder for chaining. + */ + public Builder setAltTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + altText_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.Button.Type getType() { + com.google.apps.card.v1.Button.Type result = + com.google.apps.card.v1.Button.Type.forNumber(type_); + return result == null ? com.google.apps.card.v1.Button.Type.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.apps.card.v1.Button.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000040); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Button) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Button) + private static final com.google.apps.card.v1.Button DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Button(); + } + + public static com.google.apps.card.v1.Button getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser