diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index b343a2108102..5c3e2ad397a6 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -15,7 +15,7 @@ google-cloud-pom-parent com.google.cloud - 1.86.0 + 1.86.1 ../google-cloud-pom-parent/pom.xml @@ -24,280 +24,280 @@ com.google.analytics google-analytics-admin-bom - 0.102.0 + 0.103.0-SNAPSHOT pom import com.google.analytics google-analytics-data-bom - 0.103.0 + 0.104.0-SNAPSHOT pom import com.google.area120 google-area120-tables-bom - 0.96.0 + 0.97.0-SNAPSHOT pom import com.google.cloud google-cloud-accessapproval-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-advisorynotifications-bom - 0.81.0 + 0.82.0-SNAPSHOT pom import com.google.cloud google-cloud-aiplatform-bom - 3.93.0 + 3.94.0-SNAPSHOT pom import com.google.cloud google-cloud-alloydb-bom - 0.81.0 + 0.82.0-SNAPSHOT pom import com.google.cloud google-cloud-alloydb-connectors-bom - 0.70.0 + 0.71.0-SNAPSHOT pom import com.google.cloud google-cloud-analyticshub-bom - 0.89.0 + 0.90.0-SNAPSHOT pom import com.google.cloud google-cloud-api-gateway-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-apigee-connect-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-apigee-registry-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-apihub-bom - 0.45.0 + 0.46.0-SNAPSHOT pom import com.google.cloud google-cloud-apikeys-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-appengine-admin-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-apphub-bom - 0.56.0 + 0.57.0-SNAPSHOT pom import com.google.cloud google-cloud-appoptimize-bom - 0.2.0 + 0.3.0-SNAPSHOT pom import com.google.cloud google-cloud-artifact-registry-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-asset-bom - 3.96.0 + 3.97.0-SNAPSHOT pom import com.google.cloud google-cloud-assured-workloads-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-auditmanager-bom - 0.10.0 + 0.11.0-SNAPSHOT pom import com.google.cloud google-cloud-automl-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-backupdr-bom - 0.51.0 + 0.52.0-SNAPSHOT pom import com.google.cloud google-cloud-bare-metal-solution-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-batch-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-beyondcorp-appconnections-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-beyondcorp-appconnectors-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-beyondcorp-appgateways-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-beyondcorp-clientconnectorservices-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-beyondcorp-clientgateways-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-biglake-bom - 0.80.0 + 0.81.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquery-bom - 2.66.0 + 2.67.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquery-data-exchange-bom - 2.87.0 + 2.88.0-SNAPSHOT pom import com.google.cloud google-cloud-bigqueryconnection-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquerydatapolicy-bom - 0.89.0 + 0.90.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquerydatatransfer-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquerymigration-bom - 0.95.0 + 0.96.0-SNAPSHOT pom import com.google.cloud google-cloud-bigqueryreservation-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-bigquerystorage-bom - 3.28.0 + 3.29.0-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.78.0 + 2.78.1-SNAPSHOT pom import @@ -311,238 +311,238 @@ com.google.cloud google-cloud-billing-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-billingbudgets-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-binary-authorization-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-build-bom - 3.94.0 + 3.95.0-SNAPSHOT pom import com.google.cloud google-cloud-capacityplanner-bom - 0.15.0 + 0.16.0-SNAPSHOT pom import com.google.cloud google-cloud-certificate-manager-bom - 0.95.0 + 0.96.0-SNAPSHOT pom import com.google.cloud google-cloud-ces-bom - 0.8.0 + 0.9.0-SNAPSHOT pom import com.google.cloud google-cloud-channel-bom - 3.96.0 + 3.97.0-SNAPSHOT pom import com.google.cloud google-cloud-chat-bom - 0.56.0 + 0.57.0-SNAPSHOT pom import com.google.cloud google-cloud-chronicle-bom - 0.30.0 + 0.31.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudapiregistry-bom - 0.11.0 + 0.12.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudcommerceconsumerprocurement-bom - 0.90.0 + 0.91.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudcontrolspartner-bom - 0.56.0 + 0.57.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudquotas-bom - 0.60.0 + 0.61.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudsecuritycompliance-bom - 0.19.0 + 0.20.0-SNAPSHOT pom import com.google.cloud google-cloud-cloudsupport-bom - 0.76.0 + 0.77.0-SNAPSHOT pom import com.google.cloud google-cloud-compute-bom - 1.102.0 + 1.103.0-SNAPSHOT pom import com.google.cloud google-cloud-confidentialcomputing-bom - 0.78.0 + 0.79.0-SNAPSHOT pom import com.google.cloud google-cloud-configdelivery-bom - 0.26.0 + 0.27.0-SNAPSHOT pom import com.google.cloud google-cloud-connectgateway-bom - 0.44.0 + 0.45.0-SNAPSHOT pom import com.google.cloud google-cloud-contact-center-insights-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-container-bom - 2.95.0 + 2.96.0-SNAPSHOT pom import com.google.cloud google-cloud-containeranalysis-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-contentwarehouse-bom - 0.88.0 + 0.89.0-SNAPSHOT pom import com.google.cloud google-cloud-data-fusion-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-databasecenter-bom - 0.13.0 + 0.14.0-SNAPSHOT pom import com.google.cloud google-cloud-datacatalog-bom - 1.98.0 + 1.99.0-SNAPSHOT pom import com.google.cloud google-cloud-dataflow-bom - 0.96.0 + 0.97.0-SNAPSHOT pom import com.google.cloud google-cloud-dataform-bom - 0.91.0 + 0.92.0-SNAPSHOT pom import com.google.cloud google-cloud-datalabeling-bom - 0.212.0 + 0.213.0-SNAPSHOT pom import com.google.cloud google-cloud-datalineage-bom - 0.84.0 + 0.85.0-SNAPSHOT pom import com.google.cloud google-cloud-dataplex-bom - 1.90.0 + 1.91.0-SNAPSHOT pom import com.google.cloud google-cloud-dataproc-bom - 4.89.0 + 4.90.0-SNAPSHOT pom import com.google.cloud google-cloud-dataproc-metastore-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import @@ -556,984 +556,984 @@ com.google.cloud google-cloud-datastream-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-deploy-bom - 1.90.0 + 1.91.0-SNAPSHOT pom import com.google.cloud google-cloud-developerconnect-bom - 0.49.0 + 0.50.0-SNAPSHOT pom import com.google.cloud google-cloud-devicestreaming-bom - 0.32.0 + 0.33.0-SNAPSHOT pom import com.google.cloud google-cloud-dialogflow-bom - 4.98.0 + 4.99.0-SNAPSHOT pom import com.google.cloud google-cloud-dialogflow-cx-bom - 0.103.0 + 0.104.0-SNAPSHOT pom import com.google.cloud google-cloud-discoveryengine-bom - 0.88.0 + 0.89.0-SNAPSHOT pom import com.google.cloud google-cloud-distributedcloudedge-bom - 0.89.0 + 0.90.0-SNAPSHOT pom import com.google.cloud google-cloud-dlp-bom - 3.96.0 + 3.97.0-SNAPSHOT pom import com.google.cloud google-cloud-dms-bom - 2.91.0 + 2.92.0-SNAPSHOT pom import com.google.cloud google-cloud-dns - 2.90.0 + 2.91.0-SNAPSHOT com.google.cloud google-cloud-document-ai-bom - 2.96.0 + 2.97.0-SNAPSHOT pom import com.google.cloud google-cloud-domains-bom - 1.89.0 + 1.90.0-SNAPSHOT pom import com.google.cloud google-cloud-edgenetwork-bom - 0.60.0 + 0.61.0-SNAPSHOT pom import com.google.cloud google-cloud-enterpriseknowledgegraph-bom - 0.88.0 + 0.89.0-SNAPSHOT pom import com.google.cloud google-cloud-errorreporting-bom - 0.213.0-beta + 0.214.0-beta-SNAPSHOT pom import com.google.cloud google-cloud-essential-contacts-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-eventarc-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-eventarc-publishing-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-filestore-bom - 1.93.0 + 1.94.0-SNAPSHOT pom import com.google.cloud google-cloud-financialservices-bom - 0.33.0 + 0.34.0-SNAPSHOT pom import com.google.cloud google-cloud-firestore-bom - 3.42.0 + 3.42.1-SNAPSHOT pom import com.google.cloud google-cloud-functions-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-gdchardwaremanagement-bom - 0.47.0 + 0.48.0-SNAPSHOT pom import com.google.cloud google-cloud-geminidataanalytics-bom - 0.20.0 + 0.21.0-SNAPSHOT pom import com.google.cloud google-cloud-gke-backup-bom - 0.91.0 + 0.92.0-SNAPSHOT pom import com.google.cloud google-cloud-gke-connect-gateway-bom - 0.93.0 + 0.94.0-SNAPSHOT pom import com.google.cloud google-cloud-gke-multi-cloud-bom - 0.91.0 + 0.92.0-SNAPSHOT pom import com.google.cloud google-cloud-gkehub-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-gkerecommender-bom - 0.12.0 + 0.13.0-SNAPSHOT pom import com.google.cloud google-cloud-gsuite-addons-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-health-bom - 0.1.0 + 0.2.0-SNAPSHOT pom import com.google.cloud google-cloud-hypercomputecluster-bom - 0.12.0 + 0.13.0-SNAPSHOT pom import com.google.cloud google-cloud-iamcredentials-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-iap-bom - 0.48.0 + 0.49.0-SNAPSHOT pom import com.google.cloud google-cloud-ids-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-infra-manager-bom - 0.69.0 + 0.70.0-SNAPSHOT pom import com.google.cloud google-cloud-iot-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-kms-bom - 2.95.0 + 2.96.0-SNAPSHOT pom import com.google.cloud google-cloud-kmsinventory-bom - 0.81.0 + 0.82.0-SNAPSHOT pom import com.google.cloud google-cloud-language-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-licensemanager-bom - 0.25.0 + 0.26.0-SNAPSHOT pom import com.google.cloud google-cloud-life-sciences-bom - 0.94.0 + 0.95.0-SNAPSHOT pom import com.google.cloud google-cloud-live-stream-bom - 0.94.0 + 0.95.0-SNAPSHOT pom import com.google.cloud google-cloud-locationfinder-bom - 0.17.0 + 0.18.0-SNAPSHOT pom import com.google.cloud google-cloud-logging-bom - 3.33.0 + 3.34.0-SNAPSHOT pom import com.google.cloud google-cloud-lustre-bom - 0.32.0 + 0.33.0-SNAPSHOT pom import com.google.cloud google-cloud-maintenance-bom - 0.26.0 + 0.27.0-SNAPSHOT pom import com.google.cloud google-cloud-managed-identities-bom - 1.90.0 + 1.91.0-SNAPSHOT pom import com.google.cloud google-cloud-managedkafka-bom - 0.48.0 + 0.49.0-SNAPSHOT pom import com.google.cloud google-cloud-mediatranslation-bom - 0.98.0 + 0.99.0-SNAPSHOT pom import com.google.cloud google-cloud-meet-bom - 0.59.0 + 0.60.0-SNAPSHOT pom import com.google.cloud google-cloud-memcache-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-migrationcenter-bom - 0.74.0 + 0.75.0-SNAPSHOT pom import com.google.cloud google-cloud-modelarmor-bom - 0.33.0 + 0.34.0-SNAPSHOT pom import com.google.cloud google-cloud-monitoring-bom - 3.93.0 + 3.94.0-SNAPSHOT pom import com.google.cloud google-cloud-monitoring-dashboard-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-monitoring-metricsscope-bom - 0.86.0 + 0.87.0-SNAPSHOT pom import com.google.cloud google-cloud-netapp-bom - 0.71.0 + 0.72.0-SNAPSHOT pom import com.google.cloud google-cloud-network-management-bom - 1.93.0 + 1.94.0-SNAPSHOT pom import com.google.cloud google-cloud-network-security-bom - 0.95.0 + 0.96.0-SNAPSHOT pom import com.google.cloud google-cloud-networkconnectivity-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-networkservices-bom - 0.48.0 + 0.49.0-SNAPSHOT pom import com.google.cloud google-cloud-nio-bom - 0.132.0 + 0.133.0-SNAPSHOT pom import com.google.cloud google-cloud-notebooks-bom - 1.90.0 + 1.91.0-SNAPSHOT pom import com.google.cloud google-cloud-notification - 0.210.0-beta + 0.211.0-beta-SNAPSHOT com.google.cloud google-cloud-optimization-bom - 1.90.0 + 1.91.0-SNAPSHOT pom import com.google.cloud google-cloud-oracledatabase-bom - 0.41.0 + 0.42.0-SNAPSHOT pom import com.google.cloud google-cloud-orchestration-airflow-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-orgpolicy-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-os-config-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-os-login-bom - 2.91.0 + 2.92.0-SNAPSHOT pom import com.google.cloud google-cloud-parallelstore-bom - 0.55.0 + 0.56.0-SNAPSHOT pom import com.google.cloud google-cloud-parametermanager-bom - 0.36.0 + 0.37.0-SNAPSHOT pom import com.google.cloud google-cloud-phishingprotection-bom - 0.123.0 + 0.124.0-SNAPSHOT pom import com.google.cloud google-cloud-policy-troubleshooter-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-policysimulator-bom - 0.71.0 + 0.72.0-SNAPSHOT pom import com.google.cloud google-cloud-private-catalog-bom - 0.94.0 + 0.95.0-SNAPSHOT pom import com.google.cloud google-cloud-privilegedaccessmanager-bom - 0.46.0 + 0.47.0-SNAPSHOT pom import com.google.cloud google-cloud-profiler-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-publicca-bom - 0.89.0 + 0.90.0-SNAPSHOT pom import com.google.cloud google-cloud-pubsub-bom - 1.150.2 + 1.150.3-SNAPSHOT pom import com.google.cloud google-cloud-rapidmigrationassessment-bom - 0.75.0 + 0.76.0-SNAPSHOT pom import com.google.cloud google-cloud-recaptchaenterprise-bom - 3.89.0 + 3.90.0-SNAPSHOT pom import com.google.cloud google-cloud-recommendations-ai-bom - 0.99.0 + 0.100.0-SNAPSHOT pom import com.google.cloud google-cloud-recommender-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-redis-bom - 2.95.0 + 2.96.0-SNAPSHOT pom import com.google.cloud google-cloud-redis-cluster-bom - 0.64.0 + 0.65.0-SNAPSHOT pom import com.google.cloud google-cloud-resourcemanager-bom - 1.94.0 + 1.95.0-SNAPSHOT pom import com.google.cloud google-cloud-retail-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-run-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-saasservicemgmt-bom - 0.22.0 + 0.23.0-SNAPSHOT pom import com.google.cloud google-cloud-scheduler-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-secretmanager-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-securesourcemanager-bom - 0.62.0 + 0.63.0-SNAPSHOT pom import com.google.cloud google-cloud-security-private-ca-bom - 2.94.0 + 2.95.0-SNAPSHOT pom import com.google.cloud google-cloud-securitycenter-bom - 2.100.0 + 2.101.0-SNAPSHOT pom import com.google.cloud google-cloud-securitycenter-settings-bom - 0.95.0 + 0.96.0-SNAPSHOT pom import com.google.cloud google-cloud-securitycentermanagement-bom - 0.60.0 + 0.61.0-SNAPSHOT pom import com.google.cloud google-cloud-securityposture-bom - 0.57.0 + 0.58.0-SNAPSHOT pom import com.google.cloud google-cloud-service-control-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-service-management-bom - 3.90.0 + 3.91.0-SNAPSHOT pom import com.google.cloud google-cloud-service-usage-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-servicedirectory-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-servicehealth-bom - 0.59.0 + 0.60.0-SNAPSHOT pom import com.google.cloud google-cloud-shell-bom - 2.91.0 + 2.92.0-SNAPSHOT pom import com.google.cloud google-cloud-spanner-bom - 6.117.0 + 6.118.0-SNAPSHOT pom import com.google.cloud google-cloud-spanneradapter-bom - 0.28.0 + 0.29.0-SNAPSHOT pom import com.google.cloud google-cloud-speech-bom - 4.87.0 + 4.88.0-SNAPSHOT pom import com.google.cloud google-cloud-storage-bom - 2.68.0 + 2.69.0-SNAPSHOT pom import com.google.cloud google-cloud-storage-transfer-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-storagebatchoperations-bom - 0.32.0 + 0.33.0-SNAPSHOT pom import com.google.cloud google-cloud-storageinsights-bom - 0.77.0 + 0.78.0-SNAPSHOT pom import com.google.cloud google-cloud-talent-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-tasks-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-telcoautomation-bom - 0.62.0 + 0.63.0-SNAPSHOT pom import com.google.cloud google-cloud-texttospeech-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-tpu-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-trace-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-translate-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-valkey-bom - 0.38.0 + 0.39.0-SNAPSHOT pom import com.google.cloud google-cloud-vectorsearch-bom - 0.14.0 + 0.15.0-SNAPSHOT pom import com.google.cloud google-cloud-video-intelligence-bom - 2.91.0 + 2.92.0-SNAPSHOT pom import com.google.cloud google-cloud-video-stitcher-bom - 0.92.0 + 0.93.0-SNAPSHOT pom import com.google.cloud google-cloud-video-transcoder-bom - 1.91.0 + 1.92.0-SNAPSHOT pom import com.google.cloud google-cloud-vision-bom - 3.90.0 + 3.91.0-SNAPSHOT pom import com.google.cloud google-cloud-visionai-bom - 0.49.0 + 0.50.0-SNAPSHOT pom import com.google.cloud google-cloud-vmmigration-bom - 1.92.0 + 1.93.0-SNAPSHOT pom import com.google.cloud google-cloud-vmwareengine-bom - 0.86.0 + 0.87.0-SNAPSHOT pom import com.google.cloud google-cloud-vpcaccess-bom - 2.93.0 + 2.94.0-SNAPSHOT pom import com.google.cloud google-cloud-webrisk-bom - 2.91.0 + 2.92.0-SNAPSHOT pom import com.google.cloud google-cloud-websecurityscanner-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-workflow-executions-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-workflows-bom - 2.92.0 + 2.93.0-SNAPSHOT pom import com.google.cloud google-cloud-workloadmanager-bom - 0.8.0 + 0.9.0-SNAPSHOT pom import com.google.cloud google-cloud-workspaceevents-bom - 0.56.0 + 0.57.0-SNAPSHOT pom import com.google.cloud google-cloud-workstations-bom - 0.80.0 + 0.81.0-SNAPSHOT pom import com.google.cloud google-iam-admin-bom - 3.87.0 + 3.88.0-SNAPSHOT pom import com.google.cloud google-iam-policy-bom - 1.89.0 + 1.90.0-SNAPSHOT pom import com.google.cloud google-identity-accesscontextmanager-bom - 1.93.0 + 1.94.0-SNAPSHOT pom import io.grafeas grafeas - 2.93.0 + 2.94.0-SNAPSHOT - + \ No newline at end of file diff --git a/generation_config.yaml b/generation_config.yaml index 0d915237f890..0b38bf2a77fe 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -googleapis_commitish: 3adc515b8bda328fb894f86765d9c5ec8c944480 -libraries_bom_version: 26.80.0 +googleapis_commitish: 83e70370751716489986478edc8713b455b21e86 +libraries_bom_version: 26.81.0 is_monorepo: true libraries: - api_shortname: accessapproval diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md index 2182d18d0244..7871e7b07694 100644 --- a/java-accessapproval/README.md +++ b/java-accessapproval/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.80.0 + 26.81.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-accessapproval - 2.92.0 + 2.93.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-accessapproval:2.92.0' +implementation 'com.google.cloud:google-cloud-accessapproval:2.93.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.92.0" +libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.93.0" ``` ## Authentication @@ -175,7 +175,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-accessapproval/latest/overview [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-accessapproval.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.92.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.93.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 diff --git a/java-accesscontextmanager/README.md b/java-accesscontextmanager/README.md index e202b22405cd..d6c695e72314 100644 --- a/java-accesscontextmanager/README.md +++ b/java-accesscontextmanager/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.80.0 + 26.81.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-identity-accesscontextmanager - 1.92.0 + 1.93.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-identity-accesscontextmanager:1.92.0' +implementation 'com.google.cloud:google-identity-accesscontextmanager:1.93.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.92.0" +libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.93.0" ``` ## Authentication @@ -175,7 +175,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-identity-accesscontextmanager/latest/overview [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-identity-accesscontextmanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.92.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.93.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 diff --git a/java-admanager/README.md b/java-admanager/README.md index 14f79580ccde..3b0cbec103e4 100644 --- a/java-admanager/README.md +++ b/java-admanager/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.api-ads ad-manager - 0.50.0 + 0.51.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.api-ads:ad-manager:0.50.0' +implementation 'com.google.api-ads:ad-manager:0.51.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.api-ads" % "ad-manager" % "0.50.0" +libraryDependencies += "com.google.api-ads" % "ad-manager" % "0.51.0" ``` ## Authentication @@ -158,7 +158,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/ad-manager/latest/overview [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.api-ads/ad-manager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.api-ads/ad-manager/0.50.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.api-ads/ad-manager/0.51.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 diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdBreakServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdBreakServiceClient.java index 0644fdb70550..e5da4a4dd22d 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdBreakServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdBreakServiceClient.java @@ -793,7 +793,7 @@ public final UnaryCallable createAdBreakCallable( * * @param adBreak Required. The `AdBreak` to update. *

The `AdBreak`'s `name` is used to identify the `AdBreak` to update. - * @param updateMask Required. The list of fields 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 AdBreak updateAdBreak(AdBreak adBreak, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdUnitServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdUnitServiceClient.java index 3431f8bf8f27..638767e84af7 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdUnitServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/AdUnitServiceClient.java @@ -937,7 +937,7 @@ public final UnaryCallable createAdUnitCallable() { * @param adUnit Required. The `AdUnit` to update. *

The `AdUnit`'s name is used to identify the `AdUnit` to update. Format: * `networks/{network_code}/adUnits/{ad_unit_id}` - * @param updateMask Required. The list of fields 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 AdUnit updateAdUnit(AdUnit adUnit, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceClient.java index 3296e78eb72f..52f0fbeb2144 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceClient.java @@ -27,6 +27,7 @@ import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; @@ -101,6 +102,113 @@ * * * + * + *

CreateApplication + *

API to create a `Application` object. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

BatchCreateApplications + *

API to batch create `Application` objects. + * + *

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

+ * + *

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

+ * + * + * + * + *

UpdateApplication + *

API to update a `Application` object. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

BatchUpdateApplications + *

API to batch update `Application` objects. + * + *

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

+ * + *

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

+ * + * + * + * + *

BatchArchiveApplications + *

/ API to batch archive `Application` objects. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

BatchUnarchiveApplications + *

/ API to batch unarchive `Application` objects. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * * * *

See the individual methods for example code. @@ -481,6 +589,740 @@ public final ListApplicationsPagedResponse listApplications(ListApplicationsRequ return stub.listApplicationsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   Application application = Application.newBuilder().build();
+   *   Application response = applicationServiceClient.createApplication(parent, application);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this `Application` will be created. Format: + * `networks/{network_code}` + * @param application Required. The `Application` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Application createApplication(NetworkName parent, Application application) { + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApplication(application) + .build(); + return createApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   Application application = Application.newBuilder().build();
+   *   Application response = applicationServiceClient.createApplication(parent, application);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this `Application` will be created. Format: + * `networks/{network_code}` + * @param application Required. The `Application` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Application createApplication(String parent, Application application) { + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder().setParent(parent).setApplication(application).build(); + return createApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setApplication(Application.newBuilder().build())
+   *           .build();
+   *   Application response = applicationServiceClient.createApplication(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 Application createApplication(CreateApplicationRequest request) { + return createApplicationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setApplication(Application.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.createApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApplicationCallable() { + return stub.createApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List requests = new ArrayList<>();
+   *   BatchCreateApplicationsResponse response =
+   *       applicationServiceClient.batchCreateApplications(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Applications` will be created. Format: + * `networks/{network_code}` The parent field in the CreateApplicationRequest must match this + * field. + * @param requests Required. The `Application` objects to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateApplicationsResponse batchCreateApplications( + NetworkName parent, List requests) { + BatchCreateApplicationsRequest request = + BatchCreateApplicationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchCreateApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchCreateApplicationsResponse response =
+   *       applicationServiceClient.batchCreateApplications(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Applications` will be created. Format: + * `networks/{network_code}` The parent field in the CreateApplicationRequest must match this + * field. + * @param requests Required. The `Application` objects to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateApplicationsResponse batchCreateApplications( + String parent, List requests) { + BatchCreateApplicationsRequest request = + BatchCreateApplicationsRequest.newBuilder() + .setParent(parent) + .addAllRequests(requests) + .build(); + return batchCreateApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchCreateApplicationsRequest request =
+   *       BatchCreateApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchCreateApplicationsResponse response =
+   *       applicationServiceClient.batchCreateApplications(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 BatchCreateApplicationsResponse batchCreateApplications( + BatchCreateApplicationsRequest request) { + return batchCreateApplicationsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchCreateApplicationsRequest request =
+   *       BatchCreateApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.batchCreateApplicationsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateApplicationsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateApplicationsCallable() { + return stub.batchCreateApplicationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   Application application = Application.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Application response = applicationServiceClient.updateApplication(application, updateMask);
+   * }
+   * }
+ * + * @param application Required. The `Application` to update. + *

The `Application`'s `name` is used to identify the `Application` 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 Application updateApplication(Application application, FieldMask updateMask) { + UpdateApplicationRequest request = + UpdateApplicationRequest.newBuilder() + .setApplication(application) + .setUpdateMask(updateMask) + .build(); + return updateApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setApplication(Application.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Application response = applicationServiceClient.updateApplication(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 Application updateApplication(UpdateApplicationRequest request) { + return updateApplicationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Application` object. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setApplication(Application.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.updateApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApplicationCallable() { + return stub.updateApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateApplicationsResponse response =
+   *       applicationServiceClient.batchUpdateApplications(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Applications` will be updated. Format: + * `networks/{network_code}` The parent field in the UpdateApplicationRequest must match this + * field. + * @param requests Required. The `Application` objects to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateApplicationsResponse batchUpdateApplications( + NetworkName parent, List requests) { + BatchUpdateApplicationsRequest request = + BatchUpdateApplicationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchUpdateApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateApplicationsResponse response =
+   *       applicationServiceClient.batchUpdateApplications(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Applications` will be updated. Format: + * `networks/{network_code}` The parent field in the UpdateApplicationRequest must match this + * field. + * @param requests Required. The `Application` objects to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateApplicationsResponse batchUpdateApplications( + String parent, List requests) { + BatchUpdateApplicationsRequest request = + BatchUpdateApplicationsRequest.newBuilder() + .setParent(parent) + .addAllRequests(requests) + .build(); + return batchUpdateApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchUpdateApplicationsRequest request =
+   *       BatchUpdateApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchUpdateApplicationsResponse response =
+   *       applicationServiceClient.batchUpdateApplications(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 BatchUpdateApplicationsResponse batchUpdateApplications( + BatchUpdateApplicationsRequest request) { + return batchUpdateApplicationsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchUpdateApplicationsRequest request =
+   *       BatchUpdateApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.batchUpdateApplicationsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateApplicationsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUpdateApplicationsCallable() { + return stub.batchUpdateApplicationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch archive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchArchiveApplicationsResponse response =
+   *       applicationServiceClient.batchArchiveApplications(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all `Applications` to archive. Format: + * `networks/{network_code}` + * @param names Required. The `Application` objects to archive. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchArchiveApplicationsResponse batchArchiveApplications( + NetworkName parent, List names) { + BatchArchiveApplicationsRequest request = + BatchArchiveApplicationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchArchiveApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch archive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchArchiveApplicationsResponse response =
+   *       applicationServiceClient.batchArchiveApplications(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all `Applications` to archive. Format: + * `networks/{network_code}` + * @param names Required. The `Application` objects to archive. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchArchiveApplicationsResponse batchArchiveApplications( + String parent, List names) { + BatchArchiveApplicationsRequest request = + BatchArchiveApplicationsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchArchiveApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch archive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchArchiveApplicationsRequest request =
+   *       BatchArchiveApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchArchiveApplicationsResponse response =
+   *       applicationServiceClient.batchArchiveApplications(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 BatchArchiveApplicationsResponse batchArchiveApplications( + BatchArchiveApplicationsRequest request) { + return batchArchiveApplicationsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch archive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchArchiveApplicationsRequest request =
+   *       BatchArchiveApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.batchArchiveApplicationsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchArchiveApplicationsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchArchiveApplicationsCallable() { + return stub.batchArchiveApplicationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch unarchive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchUnarchiveApplicationsResponse response =
+   *       applicationServiceClient.batchUnarchiveApplications(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all `Applications` to Unarchive. Format: + * `networks/{network_code}` + * @param names Required. The `Application` objects to unarchive. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUnarchiveApplicationsResponse batchUnarchiveApplications( + NetworkName parent, List names) { + BatchUnarchiveApplicationsRequest request = + BatchUnarchiveApplicationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchUnarchiveApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch unarchive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchUnarchiveApplicationsResponse response =
+   *       applicationServiceClient.batchUnarchiveApplications(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all `Applications` to Unarchive. Format: + * `networks/{network_code}` + * @param names Required. The `Application` objects to unarchive. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUnarchiveApplicationsResponse batchUnarchiveApplications( + String parent, List names) { + BatchUnarchiveApplicationsRequest request = + BatchUnarchiveApplicationsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchUnarchiveApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch unarchive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchUnarchiveApplicationsRequest request =
+   *       BatchUnarchiveApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchUnarchiveApplicationsResponse response =
+   *       applicationServiceClient.batchUnarchiveApplications(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 BatchUnarchiveApplicationsResponse batchUnarchiveApplications( + BatchUnarchiveApplicationsRequest request) { + return batchUnarchiveApplicationsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * / API to batch unarchive `Application` objects. + * + *

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   BatchUnarchiveApplicationsRequest request =
+   *       BatchUnarchiveApplicationsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationServiceClient.batchUnarchiveApplicationsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUnarchiveApplicationsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUnarchiveApplicationsCallable() { + return stub.batchUnarchiveApplicationsCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceSettings.java index 35fa181c1e11..c523c261e525 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ApplicationServiceSettings.java @@ -99,6 +99,41 @@ public UnaryCallSettings getApplicationSetti return ((ApplicationServiceStubSettings) getStubSettings()).listApplicationsSettings(); } + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).createApplicationSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateApplications. */ + public UnaryCallSettings + batchCreateApplicationsSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).batchCreateApplicationsSettings(); + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).updateApplicationSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateApplications. */ + public UnaryCallSettings + batchUpdateApplicationsSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).batchUpdateApplicationsSettings(); + } + + /** Returns the object with the settings used for calls to batchArchiveApplications. */ + public UnaryCallSettings + batchArchiveApplicationsSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).batchArchiveApplicationsSettings(); + } + + /** Returns the object with the settings used for calls to batchUnarchiveApplications. */ + public UnaryCallSettings + batchUnarchiveApplicationsSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()) + .batchUnarchiveApplicationsSettings(); + } + public static final ApplicationServiceSettings create(ApplicationServiceStubSettings stub) throws IOException { return new ApplicationServiceSettings.Builder(stub.toBuilder()).build(); @@ -208,6 +243,46 @@ public UnaryCallSettings.Builder getApplicat return getStubSettingsBuilder().listApplicationsSettings(); } + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return getStubSettingsBuilder().createApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateApplications. */ + public UnaryCallSettings.Builder< + BatchCreateApplicationsRequest, BatchCreateApplicationsResponse> + batchCreateApplicationsSettings() { + return getStubSettingsBuilder().batchCreateApplicationsSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return getStubSettingsBuilder().updateApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateApplications. */ + public UnaryCallSettings.Builder< + BatchUpdateApplicationsRequest, BatchUpdateApplicationsResponse> + batchUpdateApplicationsSettings() { + return getStubSettingsBuilder().batchUpdateApplicationsSettings(); + } + + /** Returns the builder for the settings used for calls to batchArchiveApplications. */ + public UnaryCallSettings.Builder< + BatchArchiveApplicationsRequest, BatchArchiveApplicationsResponse> + batchArchiveApplicationsSettings() { + return getStubSettingsBuilder().batchArchiveApplicationsSettings(); + } + + /** Returns the builder for the settings used for calls to batchUnarchiveApplications. */ + public UnaryCallSettings.Builder< + BatchUnarchiveApplicationsRequest, BatchUnarchiveApplicationsResponse> + batchUnarchiveApplicationsSettings() { + return getStubSettingsBuilder().batchUnarchiveApplicationsSettings(); + } + @Override public ApplicationServiceSettings build() throws IOException { return new ApplicationServiceSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceClient.java index 3bb0b31ae423..bf44022f49b4 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceClient.java @@ -102,6 +102,44 @@ * * * + * + *

BatchActivateCmsMetadataKeys + *

API to activate a list of `CmsMetadataKey` objects. + * + *

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

+ *
    + *
  • batchActivateCmsMetadataKeys(BatchActivateCmsMetadataKeysRequest request) + *

+ *

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

+ *
    + *
  • batchActivateCmsMetadataKeys(NetworkName parent, List<String> names) + *

  • batchActivateCmsMetadataKeys(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchActivateCmsMetadataKeysCallable() + *

+ * + * + * + *

BatchDeactivateCmsMetadataKeys + *

API to deactivate a list of `CmsMetadataKey` objects. + * + *

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

+ *
    + *
  • batchDeactivateCmsMetadataKeys(BatchDeactivateCmsMetadataKeysRequest request) + *

+ *

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

+ *
    + *
  • batchDeactivateCmsMetadataKeys(NetworkName parent, List<String> names) + *

  • batchDeactivateCmsMetadataKeys(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchDeactivateCmsMetadataKeysCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -497,6 +535,282 @@ public final ListCmsMetadataKeysPagedResponse listCmsMetadataKeys( return stub.listCmsMetadataKeysCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchActivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchActivateCmsMetadataKeys(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataKeys` will be activated. Format: + * `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataKey`s to activate. Format: + * `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateCmsMetadataKeysResponse batchActivateCmsMetadataKeys( + NetworkName parent, List names) { + BatchActivateCmsMetadataKeysRequest request = + BatchActivateCmsMetadataKeysRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchActivateCmsMetadataKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchActivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchActivateCmsMetadataKeys(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataKeys` will be activated. Format: + * `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataKey`s to activate. Format: + * `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateCmsMetadataKeysResponse batchActivateCmsMetadataKeys( + String parent, List names) { + BatchActivateCmsMetadataKeysRequest request = + BatchActivateCmsMetadataKeysRequest.newBuilder() + .setParent(parent) + .addAllNames(names) + .build(); + return batchActivateCmsMetadataKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   BatchActivateCmsMetadataKeysRequest request =
+   *       BatchActivateCmsMetadataKeysRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchActivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchActivateCmsMetadataKeys(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 BatchActivateCmsMetadataKeysResponse batchActivateCmsMetadataKeys( + BatchActivateCmsMetadataKeysRequest request) { + return batchActivateCmsMetadataKeysCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   BatchActivateCmsMetadataKeysRequest request =
+   *       BatchActivateCmsMetadataKeysRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cmsMetadataKeyServiceClient.batchActivateCmsMetadataKeysCallable().futureCall(request);
+   *   // Do something.
+   *   BatchActivateCmsMetadataKeysResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysCallable() { + return stub.batchActivateCmsMetadataKeysCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchDeactivateCmsMetadataKeys(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataKeys` will be deactivated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataKey`s to deactivate. Format: + * `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateCmsMetadataKeysResponse batchDeactivateCmsMetadataKeys( + NetworkName parent, List names) { + BatchDeactivateCmsMetadataKeysRequest request = + BatchDeactivateCmsMetadataKeysRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeactivateCmsMetadataKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchDeactivateCmsMetadataKeys(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataKeys` will be deactivated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataKey`s to deactivate. Format: + * `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateCmsMetadataKeysResponse batchDeactivateCmsMetadataKeys( + String parent, List names) { + BatchDeactivateCmsMetadataKeysRequest request = + BatchDeactivateCmsMetadataKeysRequest.newBuilder() + .setParent(parent) + .addAllNames(names) + .build(); + return batchDeactivateCmsMetadataKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   BatchDeactivateCmsMetadataKeysRequest request =
+   *       BatchDeactivateCmsMetadataKeysRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchDeactivateCmsMetadataKeysResponse response =
+   *       cmsMetadataKeyServiceClient.batchDeactivateCmsMetadataKeys(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 BatchDeactivateCmsMetadataKeysResponse batchDeactivateCmsMetadataKeys( + BatchDeactivateCmsMetadataKeysRequest request) { + return batchDeactivateCmsMetadataKeysCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataKey` objects. + * + *

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 (CmsMetadataKeyServiceClient cmsMetadataKeyServiceClient =
+   *     CmsMetadataKeyServiceClient.create()) {
+   *   BatchDeactivateCmsMetadataKeysRequest request =
+   *       BatchDeactivateCmsMetadataKeysRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cmsMetadataKeyServiceClient.batchDeactivateCmsMetadataKeysCallable().futureCall(request);
+   *   // Do something.
+   *   BatchDeactivateCmsMetadataKeysResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysCallable() { + return stub.batchDeactivateCmsMetadataKeysCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceSettings.java index 664ab67a0542..55494ec06519 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataKeyServiceSettings.java @@ -99,6 +99,22 @@ public UnaryCallSettings getCmsMetadat return ((CmsMetadataKeyServiceStubSettings) getStubSettings()).listCmsMetadataKeysSettings(); } + /** Returns the object with the settings used for calls to batchActivateCmsMetadataKeys. */ + public UnaryCallSettings< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings() { + return ((CmsMetadataKeyServiceStubSettings) getStubSettings()) + .batchActivateCmsMetadataKeysSettings(); + } + + /** Returns the object with the settings used for calls to batchDeactivateCmsMetadataKeys. */ + public UnaryCallSettings< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings() { + return ((CmsMetadataKeyServiceStubSettings) getStubSettings()) + .batchDeactivateCmsMetadataKeysSettings(); + } + public static final CmsMetadataKeyServiceSettings create(CmsMetadataKeyServiceStubSettings stub) throws IOException { return new CmsMetadataKeyServiceSettings.Builder(stub.toBuilder()).build(); @@ -212,6 +228,20 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listCmsMetadataKeysSettings(); } + /** Returns the builder for the settings used for calls to batchActivateCmsMetadataKeys. */ + public UnaryCallSettings.Builder< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings() { + return getStubSettingsBuilder().batchActivateCmsMetadataKeysSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeactivateCmsMetadataKeys. */ + public UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings() { + return getStubSettingsBuilder().batchDeactivateCmsMetadataKeysSettings(); + } + @Override public CmsMetadataKeyServiceSettings build() throws IOException { return new CmsMetadataKeyServiceSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceClient.java index 10c536daf849..d9fe4df31029 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceClient.java @@ -102,6 +102,44 @@ * * * + * + *

BatchActivateCmsMetadataValues + *

API to activate a list of `CmsMetadataValue` objects. + * + *

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

+ *
    + *
  • batchActivateCmsMetadataValues(BatchActivateCmsMetadataValuesRequest request) + *

+ *

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

+ *
    + *
  • batchActivateCmsMetadataValues(NetworkName parent, List<String> names) + *

  • batchActivateCmsMetadataValues(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchActivateCmsMetadataValuesCallable() + *

+ * + * + * + *

BatchDeactivateCmsMetadataValues + *

API to deactivate a list of `CmsMetadataValue` objects. + * + *

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

+ *
    + *
  • batchDeactivateCmsMetadataValues(BatchDeactivateCmsMetadataValuesRequest request) + *

+ *

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

+ *
    + *
  • batchDeactivateCmsMetadataValues(NetworkName parent, List<String> names) + *

  • batchDeactivateCmsMetadataValues(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchDeactivateCmsMetadataValuesCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -500,6 +538,286 @@ public final ListCmsMetadataValuesPagedResponse listCmsMetadataValues( return stub.listCmsMetadataValuesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchActivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataValues` will be activated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataValue`s to activate. Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues( + NetworkName parent, List names) { + BatchActivateCmsMetadataValuesRequest request = + BatchActivateCmsMetadataValuesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchActivateCmsMetadataValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchActivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataValues` will be activated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataValue`s to activate. Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues( + String parent, List names) { + BatchActivateCmsMetadataValuesRequest request = + BatchActivateCmsMetadataValuesRequest.newBuilder() + .setParent(parent) + .addAllNames(names) + .build(); + return batchActivateCmsMetadataValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   BatchActivateCmsMetadataValuesRequest request =
+   *       BatchActivateCmsMetadataValuesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchActivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(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 BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues( + BatchActivateCmsMetadataValuesRequest request) { + return batchActivateCmsMetadataValuesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   BatchActivateCmsMetadataValuesRequest request =
+   *       BatchActivateCmsMetadataValuesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cmsMetadataValueServiceClient
+   *           .batchActivateCmsMetadataValuesCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   BatchActivateCmsMetadataValuesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesCallable() { + return stub.batchActivateCmsMetadataValuesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataValues` will be deactivated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataValue`s to deactivate. Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues( + NetworkName parent, List names) { + BatchDeactivateCmsMetadataValuesRequest request = + BatchDeactivateCmsMetadataValuesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeactivateCmsMetadataValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(parent, names);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `CmsMetadataValues` will be deactivated. + * Format: `networks/{network_code}` + * @param names Required. The resource names of the `CmsMetadataValue`s to deactivate. Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues( + String parent, List names) { + BatchDeactivateCmsMetadataValuesRequest request = + BatchDeactivateCmsMetadataValuesRequest.newBuilder() + .setParent(parent) + .addAllNames(names) + .build(); + return batchDeactivateCmsMetadataValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   BatchDeactivateCmsMetadataValuesRequest request =
+   *       BatchDeactivateCmsMetadataValuesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchDeactivateCmsMetadataValuesResponse response =
+   *       cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(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 BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues( + BatchDeactivateCmsMetadataValuesRequest request) { + return batchDeactivateCmsMetadataValuesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate a list of `CmsMetadataValue` objects. + * + *

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 (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
+   *     CmsMetadataValueServiceClient.create()) {
+   *   BatchDeactivateCmsMetadataValuesRequest request =
+   *       BatchDeactivateCmsMetadataValuesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cmsMetadataValueServiceClient
+   *           .batchDeactivateCmsMetadataValuesCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   BatchDeactivateCmsMetadataValuesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesCallable() { + return stub.batchDeactivateCmsMetadataValuesCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceSettings.java index d9c4bdf244b6..17709e9c70b9 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CmsMetadataValueServiceSettings.java @@ -104,6 +104,22 @@ public class CmsMetadataValueServiceSettings .listCmsMetadataValuesSettings(); } + /** Returns the object with the settings used for calls to batchActivateCmsMetadataValues. */ + public UnaryCallSettings< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings() { + return ((CmsMetadataValueServiceStubSettings) getStubSettings()) + .batchActivateCmsMetadataValuesSettings(); + } + + /** Returns the object with the settings used for calls to batchDeactivateCmsMetadataValues. */ + public UnaryCallSettings< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings() { + return ((CmsMetadataValueServiceStubSettings) getStubSettings()) + .batchDeactivateCmsMetadataValuesSettings(); + } + public static final CmsMetadataValueServiceSettings create( CmsMetadataValueServiceStubSettings stub) throws IOException { return new CmsMetadataValueServiceSettings.Builder(stub.toBuilder()).build(); @@ -217,6 +233,20 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listCmsMetadataValuesSettings(); } + /** Returns the builder for the settings used for calls to batchActivateCmsMetadataValues. */ + public UnaryCallSettings.Builder< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings() { + return getStubSettingsBuilder().batchActivateCmsMetadataValuesSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeactivateCmsMetadataValues. */ + public UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings() { + return getStubSettingsBuilder().batchDeactivateCmsMetadataValuesSettings(); + } + @Override public CmsMetadataValueServiceSettings build() throws IOException { return new CmsMetadataValueServiceSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ContactServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ContactServiceClient.java index 05d72055d3ba..e1377b5dd178 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ContactServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ContactServiceClient.java @@ -815,7 +815,7 @@ public final BatchCreateContactsResponse batchCreateContacts(BatchCreateContacts * * @param contact Required. The `Contact` to update. *

The `Contact`'s `name` is used to identify the `Contact` to update. - * @param updateMask Required. The list of fields 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 Contact updateContact(Contact contact, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomFieldServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomFieldServiceClient.java index c5238e8028f4..901a49d31def 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomFieldServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomFieldServiceClient.java @@ -866,7 +866,7 @@ public final BatchCreateCustomFieldsResponse batchCreateCustomFields( * * @param customField Required. The `CustomField` to update. *

The `CustomField`'s `name` is used to identify the `CustomField` to update. - * @param updateMask Required. The list of fields 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 CustomField updateCustomField(CustomField customField, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomTargetingKeyServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomTargetingKeyServiceClient.java index bd00d1ec68a3..da09707e5b81 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomTargetingKeyServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/CustomTargetingKeyServiceClient.java @@ -917,7 +917,7 @@ public final BatchCreateCustomTargetingKeysResponse batchCreateCustomTargetingKe * @param customTargetingKey Required. The `CustomTargetingKey` to update. *

The `CustomTargetingKey`'s `name` is used to identify the `CustomTargetingKey` to * update. - * @param updateMask Required. The list of fields 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 CustomTargetingKey updateCustomTargetingKey( diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/EntitySignalsMappingServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/EntitySignalsMappingServiceClient.java index ac981022b0b7..5fa1d1f2a874 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/EntitySignalsMappingServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/EntitySignalsMappingServiceClient.java @@ -752,7 +752,7 @@ public final EntitySignalsMapping createEntitySignalsMapping( * @param entitySignalsMapping Required. The `EntitySignalsMapping` to update. *

The EntitySignalsMapping's name is used to identify the EntitySignalsMapping to update. * Format: `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` - * @param updateMask Required. The list of fields 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 EntitySignalsMapping updateEntitySignalsMapping( diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceClient.java new file mode 100644 index 000000000000..6da7f9761848 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceClient.java @@ -0,0 +1,1391 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import com.google.ads.admanager.v1.stub.LabelServiceStub; +import com.google.ads.admanager.v1.stub.LabelServiceStubSettings; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +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: Provides methods for handling `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+ *   LabelName name = LabelName.of("[NETWORK_CODE]", "[LABEL]");
+ *   Label response = labelServiceClient.getLabel(name);
+ * }
+ * }
+ * + *

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

GetLabel

API to retrieve a `Label` object.

+ *

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

+ *
    + *
  • getLabel(GetLabelRequest request) + *

+ *

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

+ *
    + *
  • getLabel(LabelName name) + *

  • getLabel(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.

+ *
    + *
  • getLabelCallable() + *

+ *

ListLabels

API to retrieve a list of `Label` objects.

+ *

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

+ *
    + *
  • listLabels(ListLabelsRequest request) + *

+ *

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

+ *
    + *
  • listLabels(NetworkName parent) + *

  • listLabels(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.

+ *
    + *
  • listLabelsPagedCallable() + *

  • listLabelsCallable() + *

+ *

CreateLabel

API to create a `Label` object.

+ *

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

+ *
    + *
  • createLabel(CreateLabelRequest request) + *

+ *

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

+ *
    + *
  • createLabel(NetworkName parent, Label label) + *

  • createLabel(String parent, Label label) + *

+ *

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

+ *
    + *
  • createLabelCallable() + *

+ *

BatchCreateLabels

API to batch create `Label` objects.

+ *

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

+ *
    + *
  • batchCreateLabels(NetworkName parent, List<CreateLabelRequest> requests) + *

  • batchCreateLabels(String parent, List<CreateLabelRequest> requests) + *

  • batchCreateLabels(BatchCreateLabelsRequest request) + *

+ *

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

+ *
    + *
  • batchCreateLabelsCallable() + *

+ *

UpdateLabel

API to update a `Label` object.

+ *

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

+ *
    + *
  • updateLabel(UpdateLabelRequest request) + *

+ *

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

+ *
    + *
  • updateLabel(Label label, 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.

+ *
    + *
  • updateLabelCallable() + *

+ *

BatchUpdateLabels

API to batch update `Label` objects.

+ *

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

+ *
    + *
  • batchUpdateLabels(NetworkName parent, List<UpdateLabelRequest> requests) + *

  • batchUpdateLabels(String parent, List<UpdateLabelRequest> requests) + *

  • batchUpdateLabels(BatchUpdateLabelsRequest request) + *

+ *

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

+ *
    + *
  • batchUpdateLabelsCallable() + *

+ *

BatchActivateLabels

API to activate `Label` objects.

+ *

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

+ *
    + *
  • batchActivateLabels(BatchActivateLabelsRequest request) + *

+ *

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

+ *
    + *
  • batchActivateLabels(NetworkName parent, List<String> names) + *

  • batchActivateLabels(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchActivateLabelsCallable() + *

+ *

BatchDeactivateLabels

API to deactivate `Label` objects.

+ *

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

+ *
    + *
  • batchDeactivateLabels(BatchDeactivateLabelsRequest request) + *

+ *

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

+ *
    + *
  • batchDeactivateLabels(NetworkName parent, List<String> names) + *

  • batchDeactivateLabels(String parent, List<String> names) + *

+ *

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

+ *
    + *
  • batchDeactivateLabelsCallable() + *

+ *
+ * + *

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 LabelServiceSettings 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
+ * LabelServiceSettings labelServiceSettings =
+ *     LabelServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LabelServiceClient labelServiceClient = LabelServiceClient.create(labelServiceSettings);
+ * }
+ * + *

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
+ * LabelServiceSettings labelServiceSettings =
+ *     LabelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LabelServiceClient labelServiceClient = LabelServiceClient.create(labelServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class LabelServiceClient implements BackgroundResource { + private final LabelServiceSettings settings; + private final LabelServiceStub stub; + + /** Constructs an instance of LabelServiceClient with default settings. */ + public static final LabelServiceClient create() throws IOException { + return create(LabelServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LabelServiceClient, 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 LabelServiceClient create(LabelServiceSettings settings) throws IOException { + return new LabelServiceClient(settings); + } + + /** + * Constructs an instance of LabelServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(LabelServiceSettings). + */ + public static final LabelServiceClient create(LabelServiceStub stub) { + return new LabelServiceClient(stub); + } + + /** + * Constructs an instance of LabelServiceClient, 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 LabelServiceClient(LabelServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LabelServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected LabelServiceClient(LabelServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final LabelServiceSettings getSettings() { + return settings; + } + + public LabelServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   LabelName name = LabelName.of("[NETWORK_CODE]", "[LABEL]");
+   *   Label response = labelServiceClient.getLabel(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Label getLabel(LabelName name) { + GetLabelRequest request = + GetLabelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String name = LabelName.of("[NETWORK_CODE]", "[LABEL]").toString();
+   *   Label response = labelServiceClient.getLabel(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Label getLabel(String name) { + GetLabelRequest request = GetLabelRequest.newBuilder().setName(name).build(); + return getLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   GetLabelRequest request =
+   *       GetLabelRequest.newBuilder()
+   *           .setName(LabelName.of("[NETWORK_CODE]", "[LABEL]").toString())
+   *           .build();
+   *   Label response = labelServiceClient.getLabel(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 Label getLabel(GetLabelRequest request) { + return getLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   GetLabelRequest request =
+   *       GetLabelRequest.newBuilder()
+   *           .setName(LabelName.of("[NETWORK_CODE]", "[LABEL]").toString())
+   *           .build();
+   *   ApiFuture
+ */ + public final UnaryCallable getLabelCallable() { + return stub.getLabelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   for (Label element : labelServiceClient.listLabels(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of Labels. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLabelsPagedResponse listLabels(NetworkName parent) { + ListLabelsRequest request = + ListLabelsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   for (Label element : labelServiceClient.listLabels(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of Labels. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLabelsPagedResponse listLabels(String parent) { + ListLabelsRequest request = ListLabelsRequest.newBuilder().setParent(parent).build(); + return listLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   ListLabelsRequest request =
+   *       ListLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   for (Label element : labelServiceClient.listLabels(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 ListLabelsPagedResponse listLabels(ListLabelsRequest request) { + return listLabelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   ListLabelsRequest request =
+   *       ListLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   ApiFuture
+ */ + public final UnaryCallable listLabelsPagedCallable() { + return stub.listLabelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   ListLabelsRequest request =
+   *       ListLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   while (true) {
+   *     ListLabelsResponse response = labelServiceClient.listLabelsCallable().call(request);
+   *     for (Label element : response.getLabelsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLabelsCallable() { + return stub.listLabelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   Label label = Label.newBuilder().build();
+   *   Label response = labelServiceClient.createLabel(parent, label);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this `Label` will be created. Format: + * `networks/{network_code}` + * @param label Required. The `Label` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Label createLabel(NetworkName parent, Label label) { + CreateLabelRequest request = + CreateLabelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLabel(label) + .build(); + return createLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   Label label = Label.newBuilder().build();
+   *   Label response = labelServiceClient.createLabel(parent, label);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this `Label` will be created. Format: + * `networks/{network_code}` + * @param label Required. The `Label` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Label createLabel(String parent, Label label) { + CreateLabelRequest request = + CreateLabelRequest.newBuilder().setParent(parent).setLabel(label).build(); + return createLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   CreateLabelRequest request =
+   *       CreateLabelRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setLabel(Label.newBuilder().build())
+   *           .build();
+   *   Label response = labelServiceClient.createLabel(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 Label createLabel(CreateLabelRequest request) { + return createLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to create a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   CreateLabelRequest request =
+   *       CreateLabelRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setLabel(Label.newBuilder().build())
+   *           .build();
+   *   ApiFuture
+ */ + public final UnaryCallable createLabelCallable() { + return stub.createLabelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List requests = new ArrayList<>();
+   *   BatchCreateLabelsResponse response = labelServiceClient.batchCreateLabels(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Labels` will be created. Format: + * `networks/{network_code}` The parent field in the CreateLabelRequest must match this field. + * @param requests Required. The `Label` objects to create. A maximum of 100 objects can be + * created in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateLabelsResponse batchCreateLabels( + NetworkName parent, List requests) { + BatchCreateLabelsRequest request = + BatchCreateLabelsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchCreateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchCreateLabelsResponse response = labelServiceClient.batchCreateLabels(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Labels` will be created. Format: + * `networks/{network_code}` The parent field in the CreateLabelRequest must match this field. + * @param requests Required. The `Label` objects to create. A maximum of 100 objects can be + * created in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateLabelsResponse batchCreateLabels( + String parent, List requests) { + BatchCreateLabelsRequest request = + BatchCreateLabelsRequest.newBuilder().setParent(parent).addAllRequests(requests).build(); + return batchCreateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchCreateLabelsRequest request =
+   *       BatchCreateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchCreateLabelsResponse response = labelServiceClient.batchCreateLabels(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 BatchCreateLabelsResponse batchCreateLabels(BatchCreateLabelsRequest request) { + return batchCreateLabelsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch create `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchCreateLabelsRequest request =
+   *       BatchCreateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       labelServiceClient.batchCreateLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateLabelsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateLabelsCallable() { + return stub.batchCreateLabelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   Label label = Label.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Label response = labelServiceClient.updateLabel(label, updateMask);
+   * }
+   * }
+ * + * @param label Required. The `Label` to update. + *

The `Label`'s `name` is used to identify the `Label` 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 Label updateLabel(Label label, FieldMask updateMask) { + UpdateLabelRequest request = + UpdateLabelRequest.newBuilder().setLabel(label).setUpdateMask(updateMask).build(); + return updateLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   UpdateLabelRequest request =
+   *       UpdateLabelRequest.newBuilder()
+   *           .setLabel(Label.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Label response = labelServiceClient.updateLabel(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 Label updateLabel(UpdateLabelRequest request) { + return updateLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to update a `Label` object. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   UpdateLabelRequest request =
+   *       UpdateLabelRequest.newBuilder()
+   *           .setLabel(Label.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture
+ */ + public final UnaryCallable updateLabelCallable() { + return stub.updateLabelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateLabelsResponse response = labelServiceClient.batchUpdateLabels(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Labels` will be updated. Format: + * `networks/{network_code}` The parent field in the UpdateLabelRequest must match this field. + * @param requests Required. The `Label` objects to update. A maximum of 100 objects can be + * updated in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateLabelsResponse batchUpdateLabels( + NetworkName parent, List requests) { + BatchUpdateLabelsRequest request = + BatchUpdateLabelsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchUpdateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateLabelsResponse response = labelServiceClient.batchUpdateLabels(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where `Labels` will be updated. Format: + * `networks/{network_code}` The parent field in the UpdateLabelRequest must match this field. + * @param requests Required. The `Label` objects to update. A maximum of 100 objects can be + * updated in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateLabelsResponse batchUpdateLabels( + String parent, List requests) { + BatchUpdateLabelsRequest request = + BatchUpdateLabelsRequest.newBuilder().setParent(parent).addAllRequests(requests).build(); + return batchUpdateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchUpdateLabelsRequest request =
+   *       BatchUpdateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchUpdateLabelsResponse response = labelServiceClient.batchUpdateLabels(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 BatchUpdateLabelsResponse batchUpdateLabels(BatchUpdateLabelsRequest request) { + return batchUpdateLabelsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to batch update `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchUpdateLabelsRequest request =
+   *       BatchUpdateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       labelServiceClient.batchUpdateLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateLabelsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUpdateLabelsCallable() { + return stub.batchUpdateLabelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchActivateLabelsResponse response = labelServiceClient.batchActivateLabels(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Format: `networks/{network_code}` + * @param names Required. Resource names for the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateLabelsResponse batchActivateLabels( + NetworkName parent, List names) { + BatchActivateLabelsRequest request = + BatchActivateLabelsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchActivateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchActivateLabelsResponse response = labelServiceClient.batchActivateLabels(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Format: `networks/{network_code}` + * @param names Required. Resource names for the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchActivateLabelsResponse batchActivateLabels(String parent, List names) { + BatchActivateLabelsRequest request = + BatchActivateLabelsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchActivateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchActivateLabelsRequest request =
+   *       BatchActivateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchActivateLabelsResponse response = labelServiceClient.batchActivateLabels(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 BatchActivateLabelsResponse batchActivateLabels(BatchActivateLabelsRequest request) { + return batchActivateLabelsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to activate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchActivateLabelsRequest request =
+   *       BatchActivateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       labelServiceClient.batchActivateLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchActivateLabelsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchActivateLabelsCallable() { + return stub.batchActivateLabelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateLabelsResponse response =
+   *       labelServiceClient.batchDeactivateLabels(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Format: `networks/{network_code}` + * @param names Required. Resource names for the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateLabelsResponse batchDeactivateLabels( + NetworkName parent, List names) { + BatchDeactivateLabelsRequest request = + BatchDeactivateLabelsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeactivateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchDeactivateLabelsResponse response =
+   *       labelServiceClient.batchDeactivateLabels(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Format: `networks/{network_code}` + * @param names Required. Resource names for the Label. Format: + * `networks/{network_code}/labels/{label_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchDeactivateLabelsResponse batchDeactivateLabels( + String parent, List names) { + BatchDeactivateLabelsRequest request = + BatchDeactivateLabelsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchDeactivateLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchDeactivateLabelsRequest request =
+   *       BatchDeactivateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchDeactivateLabelsResponse response = labelServiceClient.batchDeactivateLabels(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 BatchDeactivateLabelsResponse batchDeactivateLabels( + BatchDeactivateLabelsRequest request) { + return batchDeactivateLabelsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to deactivate `Label` objects. + * + *

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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+   *   BatchDeactivateLabelsRequest request =
+   *       BatchDeactivateLabelsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       labelServiceClient.batchDeactivateLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchDeactivateLabelsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchDeactivateLabelsCallable() { + return stub.batchDeactivateLabelsCallable(); + } + + @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 ListLabelsPagedResponse + extends AbstractPagedListResponse< + ListLabelsRequest, + ListLabelsResponse, + Label, + ListLabelsPage, + ListLabelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLabelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListLabelsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListLabelsPagedResponse(ListLabelsPage page) { + super(page, ListLabelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLabelsPage + extends AbstractPage { + + private ListLabelsPage( + PageContext context, + ListLabelsResponse response) { + super(context, response); + } + + private static ListLabelsPage createEmptyPage() { + return new ListLabelsPage(null, null); + } + + @Override + protected ListLabelsPage createPage( + PageContext context, + ListLabelsResponse response) { + return new ListLabelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLabelsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLabelsRequest, + ListLabelsResponse, + Label, + ListLabelsPage, + ListLabelsFixedSizeCollection> { + + private ListLabelsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLabelsFixedSizeCollection createEmptyCollection() { + return new ListLabelsFixedSizeCollection(null, 0); + } + + @Override + protected ListLabelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLabelsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceSettings.java new file mode 100644 index 000000000000..8fff754dcfb1 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LabelServiceSettings.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. + */ + +package com.google.ads.admanager.v1; + +import static com.google.ads.admanager.v1.LabelServiceClient.ListLabelsPagedResponse; + +import com.google.ads.admanager.v1.stub.LabelServiceStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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 LabelServiceClient}. + * + *

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

    + *
  • The default service address (admanager.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 getLabel: + * + *

{@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
+ * LabelServiceSettings.Builder labelServiceSettingsBuilder = LabelServiceSettings.newBuilder();
+ * labelServiceSettingsBuilder
+ *     .getLabelSettings()
+ *     .setRetrySettings(
+ *         labelServiceSettingsBuilder
+ *             .getLabelSettings()
+ *             .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());
+ * LabelServiceSettings labelServiceSettings = labelServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class LabelServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getLabel. */ + public UnaryCallSettings getLabelSettings() { + return ((LabelServiceStubSettings) getStubSettings()).getLabelSettings(); + } + + /** Returns the object with the settings used for calls to listLabels. */ + public PagedCallSettings + listLabelsSettings() { + return ((LabelServiceStubSettings) getStubSettings()).listLabelsSettings(); + } + + /** Returns the object with the settings used for calls to createLabel. */ + public UnaryCallSettings createLabelSettings() { + return ((LabelServiceStubSettings) getStubSettings()).createLabelSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateLabels. */ + public UnaryCallSettings + batchCreateLabelsSettings() { + return ((LabelServiceStubSettings) getStubSettings()).batchCreateLabelsSettings(); + } + + /** Returns the object with the settings used for calls to updateLabel. */ + public UnaryCallSettings updateLabelSettings() { + return ((LabelServiceStubSettings) getStubSettings()).updateLabelSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateLabels. */ + public UnaryCallSettings + batchUpdateLabelsSettings() { + return ((LabelServiceStubSettings) getStubSettings()).batchUpdateLabelsSettings(); + } + + /** Returns the object with the settings used for calls to batchActivateLabels. */ + public UnaryCallSettings + batchActivateLabelsSettings() { + return ((LabelServiceStubSettings) getStubSettings()).batchActivateLabelsSettings(); + } + + /** Returns the object with the settings used for calls to batchDeactivateLabels. */ + public UnaryCallSettings + batchDeactivateLabelsSettings() { + return ((LabelServiceStubSettings) getStubSettings()).batchDeactivateLabelsSettings(); + } + + public static final LabelServiceSettings create(LabelServiceStubSettings stub) + throws IOException { + return new LabelServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LabelServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LabelServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LabelServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LabelServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LabelServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LabelServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LabelServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 LabelServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LabelServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LabelServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(LabelServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LabelServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LabelServiceStubSettings.newBuilder()); + } + + public LabelServiceStubSettings.Builder getStubSettingsBuilder() { + return ((LabelServiceStubSettings.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 getLabel. */ + public UnaryCallSettings.Builder getLabelSettings() { + return getStubSettingsBuilder().getLabelSettings(); + } + + /** Returns the builder for the settings used for calls to listLabels. */ + public PagedCallSettings.Builder + listLabelsSettings() { + return getStubSettingsBuilder().listLabelsSettings(); + } + + /** Returns the builder for the settings used for calls to createLabel. */ + public UnaryCallSettings.Builder createLabelSettings() { + return getStubSettingsBuilder().createLabelSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateLabels. */ + public UnaryCallSettings.Builder + batchCreateLabelsSettings() { + return getStubSettingsBuilder().batchCreateLabelsSettings(); + } + + /** Returns the builder for the settings used for calls to updateLabel. */ + public UnaryCallSettings.Builder updateLabelSettings() { + return getStubSettingsBuilder().updateLabelSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateLabels. */ + public UnaryCallSettings.Builder + batchUpdateLabelsSettings() { + return getStubSettingsBuilder().batchUpdateLabelsSettings(); + } + + /** Returns the builder for the settings used for calls to batchActivateLabels. */ + public UnaryCallSettings.Builder + batchActivateLabelsSettings() { + return getStubSettingsBuilder().batchActivateLabelsSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeactivateLabels. */ + public UnaryCallSettings.Builder + batchDeactivateLabelsSettings() { + return getStubSettingsBuilder().batchDeactivateLabelsSettings(); + } + + @Override + public LabelServiceSettings build() throws IOException { + return new LabelServiceSettings(this); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceClient.java new file mode 100644 index 000000000000..1c617508418b --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceClient.java @@ -0,0 +1,596 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import com.google.ads.admanager.v1.stub.LinkedDeviceServiceStub; +import com.google.ads.admanager.v1.stub.LinkedDeviceServiceStubSettings; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Provides methods for handling `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+ *   LinkedDeviceName name = LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]");
+ *   LinkedDevice response = linkedDeviceServiceClient.getLinkedDevice(name);
+ * }
+ * }
+ * + *

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

GetLinkedDevice

Gets a `LinkedDevice`.

+ *

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

+ *
    + *
  • getLinkedDevice(GetLinkedDeviceRequest request) + *

+ *

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

+ *
    + *
  • getLinkedDevice(LinkedDeviceName name) + *

  • getLinkedDevice(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.

+ *
    + *
  • getLinkedDeviceCallable() + *

+ *

ListLinkedDevices

Lists `LinkedDevice` objects.

+ *

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

+ *
    + *
  • listLinkedDevices(ListLinkedDevicesRequest request) + *

+ *

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

+ *
    + *
  • listLinkedDevices(NetworkName parent) + *

  • listLinkedDevices(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.

+ *
    + *
  • listLinkedDevicesPagedCallable() + *

  • listLinkedDevicesCallable() + *

+ *
+ * + *

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 LinkedDeviceServiceSettings 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
+ * LinkedDeviceServiceSettings linkedDeviceServiceSettings =
+ *     LinkedDeviceServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LinkedDeviceServiceClient linkedDeviceServiceClient =
+ *     LinkedDeviceServiceClient.create(linkedDeviceServiceSettings);
+ * }
+ * + *

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
+ * LinkedDeviceServiceSettings linkedDeviceServiceSettings =
+ *     LinkedDeviceServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LinkedDeviceServiceClient linkedDeviceServiceClient =
+ *     LinkedDeviceServiceClient.create(linkedDeviceServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class LinkedDeviceServiceClient implements BackgroundResource { + private final LinkedDeviceServiceSettings settings; + private final LinkedDeviceServiceStub stub; + + /** Constructs an instance of LinkedDeviceServiceClient with default settings. */ + public static final LinkedDeviceServiceClient create() throws IOException { + return create(LinkedDeviceServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LinkedDeviceServiceClient, 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 LinkedDeviceServiceClient create(LinkedDeviceServiceSettings settings) + throws IOException { + return new LinkedDeviceServiceClient(settings); + } + + /** + * Constructs an instance of LinkedDeviceServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(LinkedDeviceServiceSettings). + */ + public static final LinkedDeviceServiceClient create(LinkedDeviceServiceStub stub) { + return new LinkedDeviceServiceClient(stub); + } + + /** + * Constructs an instance of LinkedDeviceServiceClient, 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 LinkedDeviceServiceClient(LinkedDeviceServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LinkedDeviceServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected LinkedDeviceServiceClient(LinkedDeviceServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final LinkedDeviceServiceSettings getSettings() { + return settings; + } + + public LinkedDeviceServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a `LinkedDevice`. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   LinkedDeviceName name = LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]");
+   *   LinkedDevice response = linkedDeviceServiceClient.getLinkedDevice(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the LinkedDevice. Format: + * `networks/{network_code}/linkedDevices/{linked_device_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LinkedDevice getLinkedDevice(LinkedDeviceName name) { + GetLinkedDeviceRequest request = + GetLinkedDeviceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLinkedDevice(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a `LinkedDevice`. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   String name = LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]").toString();
+   *   LinkedDevice response = linkedDeviceServiceClient.getLinkedDevice(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the LinkedDevice. Format: + * `networks/{network_code}/linkedDevices/{linked_device_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LinkedDevice getLinkedDevice(String name) { + GetLinkedDeviceRequest request = GetLinkedDeviceRequest.newBuilder().setName(name).build(); + return getLinkedDevice(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a `LinkedDevice`. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   GetLinkedDeviceRequest request =
+   *       GetLinkedDeviceRequest.newBuilder()
+   *           .setName(LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]").toString())
+   *           .build();
+   *   LinkedDevice response = linkedDeviceServiceClient.getLinkedDevice(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 LinkedDevice getLinkedDevice(GetLinkedDeviceRequest request) { + return getLinkedDeviceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a `LinkedDevice`. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   GetLinkedDeviceRequest request =
+   *       GetLinkedDeviceRequest.newBuilder()
+   *           .setName(LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       linkedDeviceServiceClient.getLinkedDeviceCallable().futureCall(request);
+   *   // Do something.
+   *   LinkedDevice response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLinkedDeviceCallable() { + return stub.getLinkedDeviceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   for (LinkedDevice element :
+   *       linkedDeviceServiceClient.listLinkedDevices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of LinkedDevices. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLinkedDevicesPagedResponse listLinkedDevices(NetworkName parent) { + ListLinkedDevicesRequest request = + ListLinkedDevicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLinkedDevices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   for (LinkedDevice element :
+   *       linkedDeviceServiceClient.listLinkedDevices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of LinkedDevices. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLinkedDevicesPagedResponse listLinkedDevices(String parent) { + ListLinkedDevicesRequest request = + ListLinkedDevicesRequest.newBuilder().setParent(parent).build(); + return listLinkedDevices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   ListLinkedDevicesRequest request =
+   *       ListLinkedDevicesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   for (LinkedDevice element :
+   *       linkedDeviceServiceClient.listLinkedDevices(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 ListLinkedDevicesPagedResponse listLinkedDevices(ListLinkedDevicesRequest request) { + return listLinkedDevicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   ListLinkedDevicesRequest request =
+   *       ListLinkedDevicesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   ApiFuture future =
+   *       linkedDeviceServiceClient.listLinkedDevicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (LinkedDevice element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLinkedDevicesPagedCallable() { + return stub.listLinkedDevicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `LinkedDevice` objects. + * + *

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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+   *   ListLinkedDevicesRequest request =
+   *       ListLinkedDevicesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   while (true) {
+   *     ListLinkedDevicesResponse response =
+   *         linkedDeviceServiceClient.listLinkedDevicesCallable().call(request);
+   *     for (LinkedDevice element : response.getLinkedDevicesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLinkedDevicesCallable() { + return stub.listLinkedDevicesCallable(); + } + + @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 ListLinkedDevicesPagedResponse + extends AbstractPagedListResponse< + ListLinkedDevicesRequest, + ListLinkedDevicesResponse, + LinkedDevice, + ListLinkedDevicesPage, + ListLinkedDevicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLinkedDevicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLinkedDevicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLinkedDevicesPagedResponse(ListLinkedDevicesPage page) { + super(page, ListLinkedDevicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLinkedDevicesPage + extends AbstractPage< + ListLinkedDevicesRequest, + ListLinkedDevicesResponse, + LinkedDevice, + ListLinkedDevicesPage> { + + private ListLinkedDevicesPage( + PageContext context, + ListLinkedDevicesResponse response) { + super(context, response); + } + + private static ListLinkedDevicesPage createEmptyPage() { + return new ListLinkedDevicesPage(null, null); + } + + @Override + protected ListLinkedDevicesPage createPage( + PageContext context, + ListLinkedDevicesResponse response) { + return new ListLinkedDevicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLinkedDevicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLinkedDevicesRequest, + ListLinkedDevicesResponse, + LinkedDevice, + ListLinkedDevicesPage, + ListLinkedDevicesFixedSizeCollection> { + + private ListLinkedDevicesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLinkedDevicesFixedSizeCollection createEmptyCollection() { + return new ListLinkedDevicesFixedSizeCollection(null, 0); + } + + @Override + protected ListLinkedDevicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLinkedDevicesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceSettings.java new file mode 100644 index 000000000000..688cd8d80a88 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/LinkedDeviceServiceSettings.java @@ -0,0 +1,217 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import static com.google.ads.admanager.v1.LinkedDeviceServiceClient.ListLinkedDevicesPagedResponse; + +import com.google.ads.admanager.v1.stub.LinkedDeviceServiceStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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 LinkedDeviceServiceClient}. + * + *

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

    + *
  • The default service address (admanager.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 getLinkedDevice: + * + *

{@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
+ * LinkedDeviceServiceSettings.Builder linkedDeviceServiceSettingsBuilder =
+ *     LinkedDeviceServiceSettings.newBuilder();
+ * linkedDeviceServiceSettingsBuilder
+ *     .getLinkedDeviceSettings()
+ *     .setRetrySettings(
+ *         linkedDeviceServiceSettingsBuilder
+ *             .getLinkedDeviceSettings()
+ *             .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());
+ * LinkedDeviceServiceSettings linkedDeviceServiceSettings =
+ *     linkedDeviceServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class LinkedDeviceServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getLinkedDevice. */ + public UnaryCallSettings getLinkedDeviceSettings() { + return ((LinkedDeviceServiceStubSettings) getStubSettings()).getLinkedDeviceSettings(); + } + + /** Returns the object with the settings used for calls to listLinkedDevices. */ + public PagedCallSettings< + ListLinkedDevicesRequest, ListLinkedDevicesResponse, ListLinkedDevicesPagedResponse> + listLinkedDevicesSettings() { + return ((LinkedDeviceServiceStubSettings) getStubSettings()).listLinkedDevicesSettings(); + } + + public static final LinkedDeviceServiceSettings create(LinkedDeviceServiceStubSettings stub) + throws IOException { + return new LinkedDeviceServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LinkedDeviceServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LinkedDeviceServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LinkedDeviceServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LinkedDeviceServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LinkedDeviceServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LinkedDeviceServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LinkedDeviceServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 LinkedDeviceServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LinkedDeviceServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LinkedDeviceServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(LinkedDeviceServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LinkedDeviceServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LinkedDeviceServiceStubSettings.newBuilder()); + } + + public LinkedDeviceServiceStubSettings.Builder getStubSettingsBuilder() { + return ((LinkedDeviceServiceStubSettings.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 getLinkedDevice. */ + public UnaryCallSettings.Builder + getLinkedDeviceSettings() { + return getStubSettingsBuilder().getLinkedDeviceSettings(); + } + + /** Returns the builder for the settings used for calls to listLinkedDevices. */ + public PagedCallSettings.Builder< + ListLinkedDevicesRequest, ListLinkedDevicesResponse, ListLinkedDevicesPagedResponse> + listLinkedDevicesSettings() { + return getStubSettingsBuilder().listLinkedDevicesSettings(); + } + + @Override + public LinkedDeviceServiceSettings build() throws IOException { + return new LinkedDeviceServiceSettings(this); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceClient.java new file mode 100644 index 000000000000..096c33288519 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceClient.java @@ -0,0 +1,465 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import com.google.ads.admanager.v1.stub.McmEarningsServiceStub; +import com.google.ads.admanager.v1.stub.McmEarningsServiceStubSettings; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Provides methods for handling `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+ *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+ *   for (McmEarnings element : mcmEarningsServiceClient.fetchMcmEarnings(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

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

FetchMcmEarnings

API to retrieve a list of `McmEarnings` objects.

+ *

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

+ *
    + *
  • fetchMcmEarnings(FetchMcmEarningsRequest request) + *

+ *

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

+ *
    + *
  • fetchMcmEarnings(NetworkName parent) + *

  • fetchMcmEarnings(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.

+ *
    + *
  • fetchMcmEarningsPagedCallable() + *

  • fetchMcmEarningsCallable() + *

+ *
+ * + *

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 McmEarningsServiceSettings 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
+ * McmEarningsServiceSettings mcmEarningsServiceSettings =
+ *     McmEarningsServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * McmEarningsServiceClient mcmEarningsServiceClient =
+ *     McmEarningsServiceClient.create(mcmEarningsServiceSettings);
+ * }
+ * + *

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
+ * McmEarningsServiceSettings mcmEarningsServiceSettings =
+ *     McmEarningsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * McmEarningsServiceClient mcmEarningsServiceClient =
+ *     McmEarningsServiceClient.create(mcmEarningsServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class McmEarningsServiceClient implements BackgroundResource { + private final McmEarningsServiceSettings settings; + private final McmEarningsServiceStub stub; + + /** Constructs an instance of McmEarningsServiceClient with default settings. */ + public static final McmEarningsServiceClient create() throws IOException { + return create(McmEarningsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of McmEarningsServiceClient, 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 McmEarningsServiceClient create(McmEarningsServiceSettings settings) + throws IOException { + return new McmEarningsServiceClient(settings); + } + + /** + * Constructs an instance of McmEarningsServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(McmEarningsServiceSettings). + */ + public static final McmEarningsServiceClient create(McmEarningsServiceStub stub) { + return new McmEarningsServiceClient(stub); + } + + /** + * Constructs an instance of McmEarningsServiceClient, 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 McmEarningsServiceClient(McmEarningsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((McmEarningsServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected McmEarningsServiceClient(McmEarningsServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final McmEarningsServiceSettings getSettings() { + return settings; + } + + public McmEarningsServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   for (McmEarnings element : mcmEarningsServiceClient.fetchMcmEarnings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of McmEarnings. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchMcmEarningsPagedResponse fetchMcmEarnings(NetworkName parent) { + FetchMcmEarningsRequest request = + FetchMcmEarningsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return fetchMcmEarnings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   for (McmEarnings element : mcmEarningsServiceClient.fetchMcmEarnings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of McmEarnings. Format: + * `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchMcmEarningsPagedResponse fetchMcmEarnings(String parent) { + FetchMcmEarningsRequest request = + FetchMcmEarningsRequest.newBuilder().setParent(parent).build(); + return fetchMcmEarnings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+   *   FetchMcmEarningsRequest request =
+   *       FetchMcmEarningsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .setMonth(Date.newBuilder().build())
+   *           .build();
+   *   for (McmEarnings element : mcmEarningsServiceClient.fetchMcmEarnings(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 FetchMcmEarningsPagedResponse fetchMcmEarnings(FetchMcmEarningsRequest request) { + return fetchMcmEarningsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+   *   FetchMcmEarningsRequest request =
+   *       FetchMcmEarningsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .setMonth(Date.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       mcmEarningsServiceClient.fetchMcmEarningsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (McmEarnings element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + fetchMcmEarningsPagedCallable() { + return stub.fetchMcmEarningsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `McmEarnings` objects. + * + *

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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+   *   FetchMcmEarningsRequest request =
+   *       FetchMcmEarningsRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .setMonth(Date.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     FetchMcmEarningsResponse response =
+   *         mcmEarningsServiceClient.fetchMcmEarningsCallable().call(request);
+   *     for (McmEarnings element : response.getMcmEarningsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + fetchMcmEarningsCallable() { + return stub.fetchMcmEarningsCallable(); + } + + @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 FetchMcmEarningsPagedResponse + extends AbstractPagedListResponse< + FetchMcmEarningsRequest, + FetchMcmEarningsResponse, + McmEarnings, + FetchMcmEarningsPage, + FetchMcmEarningsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchMcmEarningsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchMcmEarningsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchMcmEarningsPagedResponse(FetchMcmEarningsPage page) { + super(page, FetchMcmEarningsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchMcmEarningsPage + extends AbstractPage< + FetchMcmEarningsRequest, FetchMcmEarningsResponse, McmEarnings, FetchMcmEarningsPage> { + + private FetchMcmEarningsPage( + PageContext context, + FetchMcmEarningsResponse response) { + super(context, response); + } + + private static FetchMcmEarningsPage createEmptyPage() { + return new FetchMcmEarningsPage(null, null); + } + + @Override + protected FetchMcmEarningsPage createPage( + PageContext context, + FetchMcmEarningsResponse response) { + return new FetchMcmEarningsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchMcmEarningsFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchMcmEarningsRequest, + FetchMcmEarningsResponse, + McmEarnings, + FetchMcmEarningsPage, + FetchMcmEarningsFixedSizeCollection> { + + private FetchMcmEarningsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchMcmEarningsFixedSizeCollection createEmptyCollection() { + return new FetchMcmEarningsFixedSizeCollection(null, 0); + } + + @Override + protected FetchMcmEarningsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new FetchMcmEarningsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceSettings.java new file mode 100644 index 000000000000..a7054f673a83 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/McmEarningsServiceSettings.java @@ -0,0 +1,206 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import static com.google.ads.admanager.v1.McmEarningsServiceClient.FetchMcmEarningsPagedResponse; + +import com.google.ads.admanager.v1.stub.McmEarningsServiceStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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 McmEarningsServiceClient}. + * + *

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

    + *
  • The default service address (admanager.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 fetchMcmEarnings: + * + *

{@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
+ * McmEarningsServiceSettings.Builder mcmEarningsServiceSettingsBuilder =
+ *     McmEarningsServiceSettings.newBuilder();
+ * mcmEarningsServiceSettingsBuilder
+ *     .fetchMcmEarningsSettings()
+ *     .setRetrySettings(
+ *         mcmEarningsServiceSettingsBuilder
+ *             .fetchMcmEarningsSettings()
+ *             .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());
+ * McmEarningsServiceSettings mcmEarningsServiceSettings =
+ *     mcmEarningsServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class McmEarningsServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to fetchMcmEarnings. */ + public PagedCallSettings< + FetchMcmEarningsRequest, FetchMcmEarningsResponse, FetchMcmEarningsPagedResponse> + fetchMcmEarningsSettings() { + return ((McmEarningsServiceStubSettings) getStubSettings()).fetchMcmEarningsSettings(); + } + + public static final McmEarningsServiceSettings create(McmEarningsServiceStubSettings stub) + throws IOException { + return new McmEarningsServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return McmEarningsServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return McmEarningsServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return McmEarningsServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return McmEarningsServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return McmEarningsServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return McmEarningsServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return McmEarningsServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 McmEarningsServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for McmEarningsServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(McmEarningsServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(McmEarningsServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(McmEarningsServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(McmEarningsServiceStubSettings.newBuilder()); + } + + public McmEarningsServiceStubSettings.Builder getStubSettingsBuilder() { + return ((McmEarningsServiceStubSettings.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 fetchMcmEarnings. */ + public PagedCallSettings.Builder< + FetchMcmEarningsRequest, FetchMcmEarningsResponse, FetchMcmEarningsPagedResponse> + fetchMcmEarningsSettings() { + return getStubSettingsBuilder().fetchMcmEarningsSettings(); + } + + @Override + public McmEarningsServiceSettings build() throws IOException { + return new McmEarningsServiceSettings(this); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PlacementServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PlacementServiceClient.java index 881f270cb469..32d6d5e29a80 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PlacementServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PlacementServiceClient.java @@ -750,7 +750,7 @@ public final UnaryCallable createPlacementCal * @param placement Required. The `Placement` to update. *

The `Placement`'s name is used to identify the `Placement` to update. Format: * `networks/{network_code}/placements/{placement_id}` - * @param updateMask Required. The list of fields 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 Placement updatePlacement(Placement placement, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionDealServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionDealServiceClient.java index b4bb4ba23888..b9a3c8efe5e7 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionDealServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionDealServiceClient.java @@ -705,7 +705,7 @@ public final PrivateAuctionDeal createPrivateAuctionDeal( * @param privateAuctionDeal Required. The `PrivateAuctionDeal` to update. *

The `PrivateAuctionDeal`'s `name` is used to identify the `PrivateAuctionDeal` to * update. - * @param updateMask Required. The list of fields 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 PrivateAuctionDeal updatePrivateAuctionDeal( diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionServiceClient.java index a09ecf33e5e3..b4be2955dabe 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/PrivateAuctionServiceClient.java @@ -690,7 +690,7 @@ public final PrivateAuction createPrivateAuction(CreatePrivateAuctionRequest req * * @param privateAuction Required. The `PrivateAuction` to update. *

The `PrivateAuction`'s `name` is used to identify the `PrivateAuction` to update. - * @param updateMask Required. The list of fields 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 PrivateAuction updatePrivateAuction( diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ReportServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ReportServiceClient.java index cba4ad102646..a75aba7a9388 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ReportServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/ReportServiceClient.java @@ -705,7 +705,7 @@ public final UnaryCallable createReportCallable() { * } * * @param report Required. The `Report` to update. - * @param updateMask Required. The list of fields 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 Report updateReport(Report report, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceClient.java new file mode 100644 index 000000000000..bc3ce7ad9213 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceClient.java @@ -0,0 +1,641 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import com.google.ads.admanager.v1.stub.RichMediaAdsCompanyServiceStub; +import com.google.ads.admanager.v1.stub.RichMediaAdsCompanyServiceStubSettings; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Provides methods for handling `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+ *     RichMediaAdsCompanyServiceClient.create()) {
+ *   RichMediaAdsCompanyName name =
+ *       RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]");
+ *   RichMediaAdsCompany response = richMediaAdsCompanyServiceClient.getRichMediaAdsCompany(name);
+ * }
+ * }
+ * + *

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

GetRichMediaAdsCompany

API to retrieve a `RichMediaAdsCompany` object.

+ *

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

+ *
    + *
  • getRichMediaAdsCompany(GetRichMediaAdsCompanyRequest request) + *

+ *

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

+ *
    + *
  • getRichMediaAdsCompany(RichMediaAdsCompanyName name) + *

  • getRichMediaAdsCompany(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.

+ *
    + *
  • getRichMediaAdsCompanyCallable() + *

+ *

ListRichMediaAdsCompanies

API to retrieve a list of `RichMediaAdsCompany` objects.

+ *

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

+ *
    + *
  • listRichMediaAdsCompanies(ListRichMediaAdsCompaniesRequest request) + *

+ *

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

+ *
    + *
  • listRichMediaAdsCompanies(NetworkName parent) + *

  • listRichMediaAdsCompanies(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.

+ *
    + *
  • listRichMediaAdsCompaniesPagedCallable() + *

  • listRichMediaAdsCompaniesCallable() + *

+ *
+ * + *

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 + * RichMediaAdsCompanyServiceSettings 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
+ * RichMediaAdsCompanyServiceSettings richMediaAdsCompanyServiceSettings =
+ *     RichMediaAdsCompanyServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+ *     RichMediaAdsCompanyServiceClient.create(richMediaAdsCompanyServiceSettings);
+ * }
+ * + *

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
+ * RichMediaAdsCompanyServiceSettings richMediaAdsCompanyServiceSettings =
+ *     RichMediaAdsCompanyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+ *     RichMediaAdsCompanyServiceClient.create(richMediaAdsCompanyServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class RichMediaAdsCompanyServiceClient implements BackgroundResource { + private final RichMediaAdsCompanyServiceSettings settings; + private final RichMediaAdsCompanyServiceStub stub; + + /** Constructs an instance of RichMediaAdsCompanyServiceClient with default settings. */ + public static final RichMediaAdsCompanyServiceClient create() throws IOException { + return create(RichMediaAdsCompanyServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of RichMediaAdsCompanyServiceClient, 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 RichMediaAdsCompanyServiceClient create( + RichMediaAdsCompanyServiceSettings settings) throws IOException { + return new RichMediaAdsCompanyServiceClient(settings); + } + + /** + * Constructs an instance of RichMediaAdsCompanyServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(RichMediaAdsCompanyServiceSettings). + */ + public static final RichMediaAdsCompanyServiceClient create(RichMediaAdsCompanyServiceStub stub) { + return new RichMediaAdsCompanyServiceClient(stub); + } + + /** + * Constructs an instance of RichMediaAdsCompanyServiceClient, 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 RichMediaAdsCompanyServiceClient(RichMediaAdsCompanyServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((RichMediaAdsCompanyServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected RichMediaAdsCompanyServiceClient(RichMediaAdsCompanyServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RichMediaAdsCompanyServiceSettings getSettings() { + return settings; + } + + public RichMediaAdsCompanyServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `RichMediaAdsCompany` object. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   RichMediaAdsCompanyName name =
+   *       RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]");
+   *   RichMediaAdsCompany response = richMediaAdsCompanyServiceClient.getRichMediaAdsCompany(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the RichMediaAdsCompany. Format: + * `networks/{network_code}/richMediaAdsCompanies/{rich_media_ads_company_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RichMediaAdsCompany getRichMediaAdsCompany(RichMediaAdsCompanyName name) { + GetRichMediaAdsCompanyRequest request = + GetRichMediaAdsCompanyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getRichMediaAdsCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `RichMediaAdsCompany` object. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   String name =
+   *       RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]").toString();
+   *   RichMediaAdsCompany response = richMediaAdsCompanyServiceClient.getRichMediaAdsCompany(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the RichMediaAdsCompany. Format: + * `networks/{network_code}/richMediaAdsCompanies/{rich_media_ads_company_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RichMediaAdsCompany getRichMediaAdsCompany(String name) { + GetRichMediaAdsCompanyRequest request = + GetRichMediaAdsCompanyRequest.newBuilder().setName(name).build(); + return getRichMediaAdsCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `RichMediaAdsCompany` object. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   GetRichMediaAdsCompanyRequest request =
+   *       GetRichMediaAdsCompanyRequest.newBuilder()
+   *           .setName(
+   *               RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]")
+   *                   .toString())
+   *           .build();
+   *   RichMediaAdsCompany response =
+   *       richMediaAdsCompanyServiceClient.getRichMediaAdsCompany(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 RichMediaAdsCompany getRichMediaAdsCompany(GetRichMediaAdsCompanyRequest request) { + return getRichMediaAdsCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a `RichMediaAdsCompany` object. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   GetRichMediaAdsCompanyRequest request =
+   *       GetRichMediaAdsCompanyRequest.newBuilder()
+   *           .setName(
+   *               RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       richMediaAdsCompanyServiceClient.getRichMediaAdsCompanyCallable().futureCall(request);
+   *   // Do something.
+   *   RichMediaAdsCompany response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getRichMediaAdsCompanyCallable() { + return stub.getRichMediaAdsCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+   *   for (RichMediaAdsCompany element :
+   *       richMediaAdsCompanyServiceClient.listRichMediaAdsCompanies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of RichMediaAdsCompanies. + * Format: `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRichMediaAdsCompaniesPagedResponse listRichMediaAdsCompanies( + NetworkName parent) { + ListRichMediaAdsCompaniesRequest request = + ListRichMediaAdsCompaniesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRichMediaAdsCompanies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   String parent = NetworkName.of("[NETWORK_CODE]").toString();
+   *   for (RichMediaAdsCompany element :
+   *       richMediaAdsCompanyServiceClient.listRichMediaAdsCompanies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of RichMediaAdsCompanies. + * Format: `networks/{network_code}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRichMediaAdsCompaniesPagedResponse listRichMediaAdsCompanies(String parent) { + ListRichMediaAdsCompaniesRequest request = + ListRichMediaAdsCompaniesRequest.newBuilder().setParent(parent).build(); + return listRichMediaAdsCompanies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   ListRichMediaAdsCompaniesRequest request =
+   *       ListRichMediaAdsCompaniesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   for (RichMediaAdsCompany element :
+   *       richMediaAdsCompanyServiceClient.listRichMediaAdsCompanies(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 ListRichMediaAdsCompaniesPagedResponse listRichMediaAdsCompanies( + ListRichMediaAdsCompaniesRequest request) { + return listRichMediaAdsCompaniesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   ListRichMediaAdsCompaniesRequest request =
+   *       ListRichMediaAdsCompaniesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   ApiFuture future =
+   *       richMediaAdsCompanyServiceClient
+   *           .listRichMediaAdsCompaniesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (RichMediaAdsCompany element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListRichMediaAdsCompaniesRequest, ListRichMediaAdsCompaniesPagedResponse> + listRichMediaAdsCompaniesPagedCallable() { + return stub.listRichMediaAdsCompaniesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * API to retrieve a list of `RichMediaAdsCompany` objects. + * + *

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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+   *     RichMediaAdsCompanyServiceClient.create()) {
+   *   ListRichMediaAdsCompaniesRequest request =
+   *       ListRichMediaAdsCompaniesRequest.newBuilder()
+   *           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setSkip(3532159)
+   *           .build();
+   *   while (true) {
+   *     ListRichMediaAdsCompaniesResponse response =
+   *         richMediaAdsCompanyServiceClient.listRichMediaAdsCompaniesCallable().call(request);
+   *     for (RichMediaAdsCompany element : response.getRichMediaAdsCompaniesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRichMediaAdsCompaniesCallable() { + return stub.listRichMediaAdsCompaniesCallable(); + } + + @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 ListRichMediaAdsCompaniesPagedResponse + extends AbstractPagedListResponse< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany, + ListRichMediaAdsCompaniesPage, + ListRichMediaAdsCompaniesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRichMediaAdsCompaniesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRichMediaAdsCompaniesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRichMediaAdsCompaniesPagedResponse(ListRichMediaAdsCompaniesPage page) { + super(page, ListRichMediaAdsCompaniesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRichMediaAdsCompaniesPage + extends AbstractPage< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany, + ListRichMediaAdsCompaniesPage> { + + private ListRichMediaAdsCompaniesPage( + PageContext< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany> + context, + ListRichMediaAdsCompaniesResponse response) { + super(context, response); + } + + private static ListRichMediaAdsCompaniesPage createEmptyPage() { + return new ListRichMediaAdsCompaniesPage(null, null); + } + + @Override + protected ListRichMediaAdsCompaniesPage createPage( + PageContext< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany> + context, + ListRichMediaAdsCompaniesResponse response) { + return new ListRichMediaAdsCompaniesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRichMediaAdsCompaniesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + RichMediaAdsCompany, + ListRichMediaAdsCompaniesPage, + ListRichMediaAdsCompaniesFixedSizeCollection> { + + private ListRichMediaAdsCompaniesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRichMediaAdsCompaniesFixedSizeCollection createEmptyCollection() { + return new ListRichMediaAdsCompaniesFixedSizeCollection(null, 0); + } + + @Override + protected ListRichMediaAdsCompaniesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRichMediaAdsCompaniesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceSettings.java new file mode 100644 index 000000000000..ff8d4b1b2163 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/RichMediaAdsCompanyServiceSettings.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1; + +import static com.google.ads.admanager.v1.RichMediaAdsCompanyServiceClient.ListRichMediaAdsCompaniesPagedResponse; + +import com.google.ads.admanager.v1.stub.RichMediaAdsCompanyServiceStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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 RichMediaAdsCompanyServiceClient}. + * + *

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

    + *
  • The default service address (admanager.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 getRichMediaAdsCompany: + * + *

{@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
+ * RichMediaAdsCompanyServiceSettings.Builder richMediaAdsCompanyServiceSettingsBuilder =
+ *     RichMediaAdsCompanyServiceSettings.newBuilder();
+ * richMediaAdsCompanyServiceSettingsBuilder
+ *     .getRichMediaAdsCompanySettings()
+ *     .setRetrySettings(
+ *         richMediaAdsCompanyServiceSettingsBuilder
+ *             .getRichMediaAdsCompanySettings()
+ *             .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());
+ * RichMediaAdsCompanyServiceSettings richMediaAdsCompanyServiceSettings =
+ *     richMediaAdsCompanyServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class RichMediaAdsCompanyServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to getRichMediaAdsCompany. */ + public UnaryCallSettings + getRichMediaAdsCompanySettings() { + return ((RichMediaAdsCompanyServiceStubSettings) getStubSettings()) + .getRichMediaAdsCompanySettings(); + } + + /** Returns the object with the settings used for calls to listRichMediaAdsCompanies. */ + public PagedCallSettings< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + ListRichMediaAdsCompaniesPagedResponse> + listRichMediaAdsCompaniesSettings() { + return ((RichMediaAdsCompanyServiceStubSettings) getStubSettings()) + .listRichMediaAdsCompaniesSettings(); + } + + public static final RichMediaAdsCompanyServiceSettings create( + RichMediaAdsCompanyServiceStubSettings stub) throws IOException { + return new RichMediaAdsCompanyServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return RichMediaAdsCompanyServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return RichMediaAdsCompanyServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return RichMediaAdsCompanyServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return RichMediaAdsCompanyServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return RichMediaAdsCompanyServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return RichMediaAdsCompanyServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RichMediaAdsCompanyServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 RichMediaAdsCompanyServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for RichMediaAdsCompanyServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(RichMediaAdsCompanyServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(RichMediaAdsCompanyServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(RichMediaAdsCompanyServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(RichMediaAdsCompanyServiceStubSettings.newBuilder()); + } + + public RichMediaAdsCompanyServiceStubSettings.Builder getStubSettingsBuilder() { + return ((RichMediaAdsCompanyServiceStubSettings.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 getRichMediaAdsCompany. */ + public UnaryCallSettings.Builder + getRichMediaAdsCompanySettings() { + return getStubSettingsBuilder().getRichMediaAdsCompanySettings(); + } + + /** Returns the builder for the settings used for calls to listRichMediaAdsCompanies. */ + public PagedCallSettings.Builder< + ListRichMediaAdsCompaniesRequest, + ListRichMediaAdsCompaniesResponse, + ListRichMediaAdsCompaniesPagedResponse> + listRichMediaAdsCompaniesSettings() { + return getStubSettingsBuilder().listRichMediaAdsCompaniesSettings(); + } + + @Override + public RichMediaAdsCompanyServiceSettings build() throws IOException { + return new RichMediaAdsCompanyServiceSettings(this); + } + } +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/SiteServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/SiteServiceClient.java index 74bde26c96ac..7dd0e52c5ef5 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/SiteServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/SiteServiceClient.java @@ -844,7 +844,7 @@ public final BatchCreateSitesResponse batchCreateSites(BatchCreateSitesRequest r * * @param site Required. The `Site` to update. *

The `Site`'s `name` is used to identify the `Site` to update. - * @param updateMask Required. The list of fields 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 Site updateSite(Site site, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/TeamServiceClient.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/TeamServiceClient.java index 109710a33410..d2281d0d375b 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/TeamServiceClient.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/TeamServiceClient.java @@ -844,7 +844,7 @@ public final BatchCreateTeamsResponse batchCreateTeams(BatchCreateTeamsRequest r * * @param team Required. The `Team` to update. *

The `Team`'s `name` is used to identify the `Team` to update. - * @param updateMask Required. The list of fields 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 Team updateTeam(Team team, FieldMask updateMask) { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/gapic_metadata.json b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/gapic_metadata.json index cc1bb082605a..85f6650d9083 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/gapic_metadata.json +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/gapic_metadata.json @@ -91,11 +91,29 @@ "grpc": { "libraryClient": "ApplicationServiceClient", "rpcs": { + "BatchArchiveApplications": { + "methods": ["batchArchiveApplications", "batchArchiveApplications", "batchArchiveApplications", "batchArchiveApplicationsCallable"] + }, + "BatchCreateApplications": { + "methods": ["batchCreateApplications", "batchCreateApplications", "batchCreateApplications", "batchCreateApplicationsCallable"] + }, + "BatchUnarchiveApplications": { + "methods": ["batchUnarchiveApplications", "batchUnarchiveApplications", "batchUnarchiveApplications", "batchUnarchiveApplicationsCallable"] + }, + "BatchUpdateApplications": { + "methods": ["batchUpdateApplications", "batchUpdateApplications", "batchUpdateApplications", "batchUpdateApplicationsCallable"] + }, + "CreateApplication": { + "methods": ["createApplication", "createApplication", "createApplication", "createApplicationCallable"] + }, "GetApplication": { "methods": ["getApplication", "getApplication", "getApplication", "getApplicationCallable"] }, "ListApplications": { "methods": ["listApplications", "listApplications", "listApplications", "listApplicationsPagedCallable", "listApplicationsCallable"] + }, + "UpdateApplication": { + "methods": ["updateApplication", "updateApplication", "updateApplicationCallable"] } } } @@ -166,6 +184,12 @@ "grpc": { "libraryClient": "CmsMetadataKeyServiceClient", "rpcs": { + "BatchActivateCmsMetadataKeys": { + "methods": ["batchActivateCmsMetadataKeys", "batchActivateCmsMetadataKeys", "batchActivateCmsMetadataKeys", "batchActivateCmsMetadataKeysCallable"] + }, + "BatchDeactivateCmsMetadataKeys": { + "methods": ["batchDeactivateCmsMetadataKeys", "batchDeactivateCmsMetadataKeys", "batchDeactivateCmsMetadataKeys", "batchDeactivateCmsMetadataKeysCallable"] + }, "GetCmsMetadataKey": { "methods": ["getCmsMetadataKey", "getCmsMetadataKey", "getCmsMetadataKey", "getCmsMetadataKeyCallable"] }, @@ -181,6 +205,12 @@ "grpc": { "libraryClient": "CmsMetadataValueServiceClient", "rpcs": { + "BatchActivateCmsMetadataValues": { + "methods": ["batchActivateCmsMetadataValues", "batchActivateCmsMetadataValues", "batchActivateCmsMetadataValues", "batchActivateCmsMetadataValuesCallable"] + }, + "BatchDeactivateCmsMetadataValues": { + "methods": ["batchDeactivateCmsMetadataValues", "batchDeactivateCmsMetadataValues", "batchDeactivateCmsMetadataValues", "batchDeactivateCmsMetadataValuesCallable"] + }, "GetCmsMetadataValue": { "methods": ["getCmsMetadataValue", "getCmsMetadataValue", "getCmsMetadataValue", "getCmsMetadataValueCallable"] }, @@ -461,6 +491,39 @@ } } }, + "LabelService": { + "clients": { + "grpc": { + "libraryClient": "LabelServiceClient", + "rpcs": { + "BatchActivateLabels": { + "methods": ["batchActivateLabels", "batchActivateLabels", "batchActivateLabels", "batchActivateLabelsCallable"] + }, + "BatchCreateLabels": { + "methods": ["batchCreateLabels", "batchCreateLabels", "batchCreateLabels", "batchCreateLabelsCallable"] + }, + "BatchDeactivateLabels": { + "methods": ["batchDeactivateLabels", "batchDeactivateLabels", "batchDeactivateLabels", "batchDeactivateLabelsCallable"] + }, + "BatchUpdateLabels": { + "methods": ["batchUpdateLabels", "batchUpdateLabels", "batchUpdateLabels", "batchUpdateLabelsCallable"] + }, + "CreateLabel": { + "methods": ["createLabel", "createLabel", "createLabel", "createLabelCallable"] + }, + "GetLabel": { + "methods": ["getLabel", "getLabel", "getLabel", "getLabelCallable"] + }, + "ListLabels": { + "methods": ["listLabels", "listLabels", "listLabels", "listLabelsPagedCallable", "listLabelsCallable"] + }, + "UpdateLabel": { + "methods": ["updateLabel", "updateLabel", "updateLabelCallable"] + } + } + } + } + }, "LineItemService": { "clients": { "grpc": { @@ -476,6 +539,33 @@ } } }, + "LinkedDeviceService": { + "clients": { + "grpc": { + "libraryClient": "LinkedDeviceServiceClient", + "rpcs": { + "GetLinkedDevice": { + "methods": ["getLinkedDevice", "getLinkedDevice", "getLinkedDevice", "getLinkedDeviceCallable"] + }, + "ListLinkedDevices": { + "methods": ["listLinkedDevices", "listLinkedDevices", "listLinkedDevices", "listLinkedDevicesPagedCallable", "listLinkedDevicesCallable"] + } + } + } + } + }, + "McmEarningsService": { + "clients": { + "grpc": { + "libraryClient": "McmEarningsServiceClient", + "rpcs": { + "FetchMcmEarnings": { + "methods": ["fetchMcmEarnings", "fetchMcmEarnings", "fetchMcmEarnings", "fetchMcmEarningsPagedCallable", "fetchMcmEarningsCallable"] + } + } + } + } + }, "MobileCarrierService": { "clients": { "grpc": { @@ -701,6 +791,21 @@ } } }, + "RichMediaAdsCompanyService": { + "clients": { + "grpc": { + "libraryClient": "RichMediaAdsCompanyServiceClient", + "rpcs": { + "GetRichMediaAdsCompany": { + "methods": ["getRichMediaAdsCompany", "getRichMediaAdsCompany", "getRichMediaAdsCompany", "getRichMediaAdsCompanyCallable"] + }, + "ListRichMediaAdsCompanies": { + "methods": ["listRichMediaAdsCompanies", "listRichMediaAdsCompanies", "listRichMediaAdsCompanies", "listRichMediaAdsCompaniesPagedCallable", "listRichMediaAdsCompaniesCallable"] + } + } + } + } + }, "RoleService": { "clients": { "grpc": { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/package-info.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/package-info.java index 86d2c68fb36f..ad0b612ad45f 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/package-info.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/package-info.java @@ -474,6 +474,24 @@ * } * } * + *

======================= LabelServiceClient ======================= + * + *

Service Description: Provides methods for handling `Label` objects. + * + *

Sample for LabelServiceClient: + * + *

{@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 (LabelServiceClient labelServiceClient = LabelServiceClient.create()) {
+ *   LabelName name = LabelName.of("[NETWORK_CODE]", "[LABEL]");
+ *   Label response = labelServiceClient.getLabel(name);
+ * }
+ * }
+ * *

======================= LineItemServiceClient ======================= * *

Service Description: Provides methods for handling `LineItem` objects. @@ -492,6 +510,44 @@ * } * } * + *

======================= LinkedDeviceServiceClient ======================= + * + *

Service Description: Provides methods for handling `LinkedDevice` objects. + * + *

Sample for LinkedDeviceServiceClient: + * + *

{@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 (LinkedDeviceServiceClient linkedDeviceServiceClient = LinkedDeviceServiceClient.create()) {
+ *   LinkedDeviceName name = LinkedDeviceName.of("[NETWORK_CODE]", "[LINKED_DEVICE]");
+ *   LinkedDevice response = linkedDeviceServiceClient.getLinkedDevice(name);
+ * }
+ * }
+ * + *

======================= McmEarningsServiceClient ======================= + * + *

Service Description: Provides methods for handling `McmEarnings` objects. + * + *

Sample for McmEarningsServiceClient: + * + *

{@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 (McmEarningsServiceClient mcmEarningsServiceClient = McmEarningsServiceClient.create()) {
+ *   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
+ *   for (McmEarnings element : mcmEarningsServiceClient.fetchMcmEarnings(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * *

======================= MobileCarrierServiceClient ======================= * *

Service Description: Provides methods for handling `MobileCarrier` objects. @@ -721,6 +777,26 @@ * } * } * + *

======================= RichMediaAdsCompanyServiceClient ======================= + * + *

Service Description: Provides methods for handling `RichMediaAdsCompany` objects. + * + *

Sample for RichMediaAdsCompanyServiceClient: + * + *

{@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 (RichMediaAdsCompanyServiceClient richMediaAdsCompanyServiceClient =
+ *     RichMediaAdsCompanyServiceClient.create()) {
+ *   RichMediaAdsCompanyName name =
+ *       RichMediaAdsCompanyName.of("[NETWORK_CODE]", "[RICH_MEDIA_ADS_COMPANY]");
+ *   RichMediaAdsCompany response = richMediaAdsCompanyServiceClient.getRichMediaAdsCompany(name);
+ * }
+ * }
+ * *

======================= RoleServiceClient ======================= * *

Service Description: Provides methods for handling `Role` objects. diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdBreakServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdBreakServiceStubSettings.java index f8190602081d..a6e01673b88b 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdBreakServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdBreakServiceStubSettings.java @@ -112,7 +112,10 @@ public class AdBreakServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getAdBreakSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdReviewCenterAdServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdReviewCenterAdServiceStubSettings.java index d2cdf73a8710..449710bbb6d7 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdReviewCenterAdServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdReviewCenterAdServiceStubSettings.java @@ -146,7 +146,10 @@ public class AdReviewCenterAdServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final PagedCallSettings< SearchAdReviewCenterAdsRequest, diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdUnitServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdUnitServiceStubSettings.java index bb6ebb4521ed..462c22a3c09c 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdUnitServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AdUnitServiceStubSettings.java @@ -124,7 +124,10 @@ public class AdUnitServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getAdUnitSettings; private final PagedCallSettings diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStub.java index a722dbc14747..19b91cdb03c0 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStub.java @@ -19,9 +19,19 @@ import static com.google.ads.admanager.v1.ApplicationServiceClient.ListApplicationsPagedResponse; import com.google.ads.admanager.v1.Application; +import com.google.ads.admanager.v1.BatchArchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchArchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchCreateApplicationsRequest; +import com.google.ads.admanager.v1.BatchCreateApplicationsResponse; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchUpdateApplicationsRequest; +import com.google.ads.admanager.v1.BatchUpdateApplicationsResponse; +import com.google.ads.admanager.v1.CreateApplicationRequest; import com.google.ads.admanager.v1.GetApplicationRequest; import com.google.ads.admanager.v1.ListApplicationsRequest; import com.google.ads.admanager.v1.ListApplicationsResponse; +import com.google.ads.admanager.v1.UpdateApplicationRequest; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import javax.annotation.Generated; @@ -49,6 +59,35 @@ public UnaryCallable getApplicationCallable( throw new UnsupportedOperationException("Not implemented: listApplicationsCallable()"); } + public UnaryCallable createApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: createApplicationCallable()"); + } + + public UnaryCallable + batchCreateApplicationsCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateApplicationsCallable()"); + } + + public UnaryCallable updateApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: updateApplicationCallable()"); + } + + public UnaryCallable + batchUpdateApplicationsCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateApplicationsCallable()"); + } + + public UnaryCallable + batchArchiveApplicationsCallable() { + throw new UnsupportedOperationException("Not implemented: batchArchiveApplicationsCallable()"); + } + + public UnaryCallable + batchUnarchiveApplicationsCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchUnarchiveApplicationsCallable()"); + } + @Override public abstract void close(); } diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStubSettings.java index 15c2e3f860fc..5b7b99784300 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ApplicationServiceStubSettings.java @@ -19,9 +19,19 @@ import static com.google.ads.admanager.v1.ApplicationServiceClient.ListApplicationsPagedResponse; import com.google.ads.admanager.v1.Application; +import com.google.ads.admanager.v1.BatchArchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchArchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchCreateApplicationsRequest; +import com.google.ads.admanager.v1.BatchCreateApplicationsResponse; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchUpdateApplicationsRequest; +import com.google.ads.admanager.v1.BatchUpdateApplicationsResponse; +import com.google.ads.admanager.v1.CreateApplicationRequest; import com.google.ads.admanager.v1.GetApplicationRequest; import com.google.ads.admanager.v1.ListApplicationsRequest; import com.google.ads.admanager.v1.ListApplicationsResponse; +import com.google.ads.admanager.v1.UpdateApplicationRequest; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ObsoleteApi; @@ -109,12 +119,26 @@ public class ApplicationServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getApplicationSettings; private final PagedCallSettings< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> listApplicationsSettings; + private final UnaryCallSettings createApplicationSettings; + private final UnaryCallSettings + batchCreateApplicationsSettings; + private final UnaryCallSettings updateApplicationSettings; + private final UnaryCallSettings + batchUpdateApplicationsSettings; + private final UnaryCallSettings + batchArchiveApplicationsSettings; + private final UnaryCallSettings< + BatchUnarchiveApplicationsRequest, BatchUnarchiveApplicationsResponse> + batchUnarchiveApplicationsSettings; private static final PagedListDescriptor< ListApplicationsRequest, ListApplicationsResponse, Application> @@ -185,6 +209,40 @@ public UnaryCallSettings getApplicationSetti return listApplicationsSettings; } + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the object with the settings used for calls to batchCreateApplications. */ + public UnaryCallSettings + batchCreateApplicationsSettings() { + return batchCreateApplicationsSettings; + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateApplications. */ + public UnaryCallSettings + batchUpdateApplicationsSettings() { + return batchUpdateApplicationsSettings; + } + + /** Returns the object with the settings used for calls to batchArchiveApplications. */ + public UnaryCallSettings + batchArchiveApplicationsSettings() { + return batchArchiveApplicationsSettings; + } + + /** Returns the object with the settings used for calls to batchUnarchiveApplications. */ + public UnaryCallSettings + batchUnarchiveApplicationsSettings() { + return batchUnarchiveApplicationsSettings; + } + public ApplicationServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -269,6 +327,13 @@ protected ApplicationServiceStubSettings(Builder settingsBuilder) throws IOExcep getApplicationSettings = settingsBuilder.getApplicationSettings().build(); listApplicationsSettings = settingsBuilder.listApplicationsSettings().build(); + createApplicationSettings = settingsBuilder.createApplicationSettings().build(); + batchCreateApplicationsSettings = settingsBuilder.batchCreateApplicationsSettings().build(); + updateApplicationSettings = settingsBuilder.updateApplicationSettings().build(); + batchUpdateApplicationsSettings = settingsBuilder.batchUpdateApplicationsSettings().build(); + batchArchiveApplicationsSettings = settingsBuilder.batchArchiveApplicationsSettings().build(); + batchUnarchiveApplicationsSettings = + settingsBuilder.batchUnarchiveApplicationsSettings().build(); } @Override @@ -289,6 +354,22 @@ public static class Builder private final PagedCallSettings.Builder< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> listApplicationsSettings; + private final UnaryCallSettings.Builder + createApplicationSettings; + private final UnaryCallSettings.Builder< + BatchCreateApplicationsRequest, BatchCreateApplicationsResponse> + batchCreateApplicationsSettings; + private final UnaryCallSettings.Builder + updateApplicationSettings; + private final UnaryCallSettings.Builder< + BatchUpdateApplicationsRequest, BatchUpdateApplicationsResponse> + batchUpdateApplicationsSettings; + private final UnaryCallSettings.Builder< + BatchArchiveApplicationsRequest, BatchArchiveApplicationsResponse> + batchArchiveApplicationsSettings; + private final UnaryCallSettings.Builder< + BatchUnarchiveApplicationsRequest, BatchUnarchiveApplicationsResponse> + batchUnarchiveApplicationsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -318,10 +399,23 @@ protected Builder(ClientContext clientContext) { getApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listApplicationsSettings = PagedCallSettings.newBuilder(LIST_APPLICATIONS_PAGE_STR_FACT); + createApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateApplicationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUpdateApplicationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchArchiveApplicationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUnarchiveApplicationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getApplicationSettings, listApplicationsSettings); + getApplicationSettings, + listApplicationsSettings, + createApplicationSettings, + batchCreateApplicationsSettings, + updateApplicationSettings, + batchUpdateApplicationsSettings, + batchArchiveApplicationsSettings, + batchUnarchiveApplicationsSettings); initDefaults(this); } @@ -330,10 +424,23 @@ protected Builder(ApplicationServiceStubSettings settings) { getApplicationSettings = settings.getApplicationSettings.toBuilder(); listApplicationsSettings = settings.listApplicationsSettings.toBuilder(); + createApplicationSettings = settings.createApplicationSettings.toBuilder(); + batchCreateApplicationsSettings = settings.batchCreateApplicationsSettings.toBuilder(); + updateApplicationSettings = settings.updateApplicationSettings.toBuilder(); + batchUpdateApplicationsSettings = settings.batchUpdateApplicationsSettings.toBuilder(); + batchArchiveApplicationsSettings = settings.batchArchiveApplicationsSettings.toBuilder(); + batchUnarchiveApplicationsSettings = settings.batchUnarchiveApplicationsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getApplicationSettings, listApplicationsSettings); + getApplicationSettings, + listApplicationsSettings, + createApplicationSettings, + batchCreateApplicationsSettings, + updateApplicationSettings, + batchUpdateApplicationsSettings, + batchArchiveApplicationsSettings, + batchUnarchiveApplicationsSettings); } private static Builder createDefault() { @@ -359,6 +466,36 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .createApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchCreateApplicationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchUpdateApplicationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchArchiveApplicationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchUnarchiveApplicationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + return builder; } @@ -389,6 +526,46 @@ public UnaryCallSettings.Builder getApplicat return listApplicationsSettings; } + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateApplications. */ + public UnaryCallSettings.Builder< + BatchCreateApplicationsRequest, BatchCreateApplicationsResponse> + batchCreateApplicationsSettings() { + return batchCreateApplicationsSettings; + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateApplications. */ + public UnaryCallSettings.Builder< + BatchUpdateApplicationsRequest, BatchUpdateApplicationsResponse> + batchUpdateApplicationsSettings() { + return batchUpdateApplicationsSettings; + } + + /** Returns the builder for the settings used for calls to batchArchiveApplications. */ + public UnaryCallSettings.Builder< + BatchArchiveApplicationsRequest, BatchArchiveApplicationsResponse> + batchArchiveApplicationsSettings() { + return batchArchiveApplicationsSettings; + } + + /** Returns the builder for the settings used for calls to batchUnarchiveApplications. */ + public UnaryCallSettings.Builder< + BatchUnarchiveApplicationsRequest, BatchUnarchiveApplicationsResponse> + batchUnarchiveApplicationsSettings() { + return batchUnarchiveApplicationsSettings; + } + @Override public ApplicationServiceStubSettings build() throws IOException { return new ApplicationServiceStubSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AudienceSegmentServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AudienceSegmentServiceStubSettings.java index a3c1c3bf2d87..7a92dcc6f598 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AudienceSegmentServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/AudienceSegmentServiceStubSettings.java @@ -110,7 +110,10 @@ public class AudienceSegmentServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getAudienceSegmentSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BandwidthGroupServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BandwidthGroupServiceStubSettings.java index a6fe305b4159..5a0fbeb6034f 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BandwidthGroupServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BandwidthGroupServiceStubSettings.java @@ -110,7 +110,10 @@ public class BandwidthGroupServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getBandwidthGroupSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserLanguageServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserLanguageServiceStubSettings.java index 9e894abc7902..a2f11ac6e7bf 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserLanguageServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserLanguageServiceStubSettings.java @@ -110,7 +110,10 @@ public class BrowserLanguageServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getBrowserLanguageSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserServiceStubSettings.java index 7632b07fedef..33be088b10bf 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/BrowserServiceStubSettings.java @@ -108,7 +108,10 @@ public class BrowserServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getBrowserSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStub.java index d63c6ba63e41..474af166a73f 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStub.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataKeyServiceClient.ListCmsMetadataKeysPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysResponse; import com.google.ads.admanager.v1.CmsMetadataKey; import com.google.ads.admanager.v1.GetCmsMetadataKeyRequest; import com.google.ads.admanager.v1.ListCmsMetadataKeysRequest; @@ -49,6 +53,19 @@ public UnaryCallable getCmsMetadataKey throw new UnsupportedOperationException("Not implemented: listCmsMetadataKeysCallable()"); } + public UnaryCallable + batchActivateCmsMetadataKeysCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchActivateCmsMetadataKeysCallable()"); + } + + public UnaryCallable< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeactivateCmsMetadataKeysCallable()"); + } + @Override public abstract void close(); } diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStubSettings.java index ad708d4793d0..8b3dd7bb29a1 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataKeyServiceStubSettings.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataKeyServiceClient.ListCmsMetadataKeysPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysResponse; import com.google.ads.admanager.v1.CmsMetadataKey; import com.google.ads.admanager.v1.GetCmsMetadataKeyRequest; import com.google.ads.admanager.v1.ListCmsMetadataKeysRequest; @@ -110,13 +114,22 @@ public class CmsMetadataKeyServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCmsMetadataKeySettings; private final PagedCallSettings< ListCmsMetadataKeysRequest, ListCmsMetadataKeysResponse, ListCmsMetadataKeysPagedResponse> listCmsMetadataKeysSettings; + private final UnaryCallSettings< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings; + private final UnaryCallSettings< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings; private static final PagedListDescriptor< ListCmsMetadataKeysRequest, ListCmsMetadataKeysResponse, CmsMetadataKey> @@ -189,6 +202,20 @@ public UnaryCallSettings getCmsMetadat return listCmsMetadataKeysSettings; } + /** Returns the object with the settings used for calls to batchActivateCmsMetadataKeys. */ + public UnaryCallSettings< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings() { + return batchActivateCmsMetadataKeysSettings; + } + + /** Returns the object with the settings used for calls to batchDeactivateCmsMetadataKeys. */ + public UnaryCallSettings< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings() { + return batchDeactivateCmsMetadataKeysSettings; + } + public CmsMetadataKeyServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -273,6 +300,10 @@ protected CmsMetadataKeyServiceStubSettings(Builder settingsBuilder) throws IOEx getCmsMetadataKeySettings = settingsBuilder.getCmsMetadataKeySettings().build(); listCmsMetadataKeysSettings = settingsBuilder.listCmsMetadataKeysSettings().build(); + batchActivateCmsMetadataKeysSettings = + settingsBuilder.batchActivateCmsMetadataKeysSettings().build(); + batchDeactivateCmsMetadataKeysSettings = + settingsBuilder.batchDeactivateCmsMetadataKeysSettings().build(); } @Override @@ -295,6 +326,12 @@ public static class Builder ListCmsMetadataKeysResponse, ListCmsMetadataKeysPagedResponse> listCmsMetadataKeysSettings; + private final UnaryCallSettings.Builder< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings; + private final UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -325,10 +362,15 @@ protected Builder(ClientContext clientContext) { getCmsMetadataKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listCmsMetadataKeysSettings = PagedCallSettings.newBuilder(LIST_CMS_METADATA_KEYS_PAGE_STR_FACT); + batchActivateCmsMetadataKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeactivateCmsMetadataKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getCmsMetadataKeySettings, listCmsMetadataKeysSettings); + getCmsMetadataKeySettings, + listCmsMetadataKeysSettings, + batchActivateCmsMetadataKeysSettings, + batchDeactivateCmsMetadataKeysSettings); initDefaults(this); } @@ -337,10 +379,17 @@ protected Builder(CmsMetadataKeyServiceStubSettings settings) { getCmsMetadataKeySettings = settings.getCmsMetadataKeySettings.toBuilder(); listCmsMetadataKeysSettings = settings.listCmsMetadataKeysSettings.toBuilder(); + batchActivateCmsMetadataKeysSettings = + settings.batchActivateCmsMetadataKeysSettings.toBuilder(); + batchDeactivateCmsMetadataKeysSettings = + settings.batchDeactivateCmsMetadataKeysSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getCmsMetadataKeySettings, listCmsMetadataKeysSettings); + getCmsMetadataKeySettings, + listCmsMetadataKeysSettings, + batchActivateCmsMetadataKeysSettings, + batchDeactivateCmsMetadataKeysSettings); } private static Builder createDefault() { @@ -366,6 +415,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .batchActivateCmsMetadataKeysSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchDeactivateCmsMetadataKeysSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + return builder; } @@ -399,6 +458,20 @@ public Builder applyToAllUnaryMethods( return listCmsMetadataKeysSettings; } + /** Returns the builder for the settings used for calls to batchActivateCmsMetadataKeys. */ + public UnaryCallSettings.Builder< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysSettings() { + return batchActivateCmsMetadataKeysSettings; + } + + /** Returns the builder for the settings used for calls to batchDeactivateCmsMetadataKeys. */ + public UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysSettings() { + return batchDeactivateCmsMetadataKeysSettings; + } + @Override public CmsMetadataKeyServiceStubSettings build() throws IOException { return new CmsMetadataKeyServiceStubSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStub.java index f881e666fb92..4764b76f7f87 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStub.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesResponse; import com.google.ads.admanager.v1.CmsMetadataValue; import com.google.ads.admanager.v1.GetCmsMetadataValueRequest; import com.google.ads.admanager.v1.ListCmsMetadataValuesRequest; @@ -50,6 +54,20 @@ public UnaryCallable getCmsMetadat throw new UnsupportedOperationException("Not implemented: listCmsMetadataValuesCallable()"); } + public UnaryCallable< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchActivateCmsMetadataValuesCallable()"); + } + + public UnaryCallable< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeactivateCmsMetadataValuesCallable()"); + } + @Override public abstract void close(); } diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStubSettings.java index 1d4a004203ba..a1d73a7be13a 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CmsMetadataValueServiceStubSettings.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesResponse; import com.google.ads.admanager.v1.CmsMetadataValue; import com.google.ads.admanager.v1.GetCmsMetadataValueRequest; import com.google.ads.admanager.v1.ListCmsMetadataValuesRequest; @@ -110,7 +114,10 @@ public class CmsMetadataValueServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCmsMetadataValueSettings; @@ -119,6 +126,12 @@ public class CmsMetadataValueServiceStubSettings ListCmsMetadataValuesResponse, ListCmsMetadataValuesPagedResponse> listCmsMetadataValuesSettings; + private final UnaryCallSettings< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings; + private final UnaryCallSettings< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings; private static final PagedListDescriptor< ListCmsMetadataValuesRequest, ListCmsMetadataValuesResponse, CmsMetadataValue> @@ -198,6 +211,20 @@ public ApiFuture getFuturePagedResponse( return listCmsMetadataValuesSettings; } + /** Returns the object with the settings used for calls to batchActivateCmsMetadataValues. */ + public UnaryCallSettings< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings() { + return batchActivateCmsMetadataValuesSettings; + } + + /** Returns the object with the settings used for calls to batchDeactivateCmsMetadataValues. */ + public UnaryCallSettings< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings() { + return batchDeactivateCmsMetadataValuesSettings; + } + public CmsMetadataValueServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -282,6 +309,10 @@ protected CmsMetadataValueServiceStubSettings(Builder settingsBuilder) throws IO getCmsMetadataValueSettings = settingsBuilder.getCmsMetadataValueSettings().build(); listCmsMetadataValuesSettings = settingsBuilder.listCmsMetadataValuesSettings().build(); + batchActivateCmsMetadataValuesSettings = + settingsBuilder.batchActivateCmsMetadataValuesSettings().build(); + batchDeactivateCmsMetadataValuesSettings = + settingsBuilder.batchDeactivateCmsMetadataValuesSettings().build(); } @Override @@ -304,6 +335,12 @@ public static class Builder ListCmsMetadataValuesResponse, ListCmsMetadataValuesPagedResponse> listCmsMetadataValuesSettings; + private final UnaryCallSettings.Builder< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings; + private final UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -334,10 +371,15 @@ protected Builder(ClientContext clientContext) { getCmsMetadataValueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listCmsMetadataValuesSettings = PagedCallSettings.newBuilder(LIST_CMS_METADATA_VALUES_PAGE_STR_FACT); + batchActivateCmsMetadataValuesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeactivateCmsMetadataValuesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getCmsMetadataValueSettings, listCmsMetadataValuesSettings); + getCmsMetadataValueSettings, + listCmsMetadataValuesSettings, + batchActivateCmsMetadataValuesSettings, + batchDeactivateCmsMetadataValuesSettings); initDefaults(this); } @@ -346,10 +388,17 @@ protected Builder(CmsMetadataValueServiceStubSettings settings) { getCmsMetadataValueSettings = settings.getCmsMetadataValueSettings.toBuilder(); listCmsMetadataValuesSettings = settings.listCmsMetadataValuesSettings.toBuilder(); + batchActivateCmsMetadataValuesSettings = + settings.batchActivateCmsMetadataValuesSettings.toBuilder(); + batchDeactivateCmsMetadataValuesSettings = + settings.batchDeactivateCmsMetadataValuesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - getCmsMetadataValueSettings, listCmsMetadataValuesSettings); + getCmsMetadataValueSettings, + listCmsMetadataValuesSettings, + batchActivateCmsMetadataValuesSettings, + batchDeactivateCmsMetadataValuesSettings); } private static Builder createDefault() { @@ -375,6 +424,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .batchActivateCmsMetadataValuesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchDeactivateCmsMetadataValuesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + return builder; } @@ -408,6 +467,20 @@ public Builder applyToAllUnaryMethods( return listCmsMetadataValuesSettings; } + /** Returns the builder for the settings used for calls to batchActivateCmsMetadataValues. */ + public UnaryCallSettings.Builder< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesSettings() { + return batchActivateCmsMetadataValuesSettings; + } + + /** Returns the builder for the settings used for calls to batchDeactivateCmsMetadataValues. */ + public UnaryCallSettings.Builder< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesSettings() { + return batchDeactivateCmsMetadataValuesSettings; + } + @Override public CmsMetadataValueServiceStubSettings build() throws IOException { return new CmsMetadataValueServiceStubSettings(this); diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CompanyServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CompanyServiceStubSettings.java index d7482ebc04af..b3305740f209 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CompanyServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CompanyServiceStubSettings.java @@ -108,7 +108,10 @@ public class CompanyServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCompanySettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContactServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContactServiceStubSettings.java index a320c91fcffe..d5a9f0786215 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContactServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContactServiceStubSettings.java @@ -114,7 +114,10 @@ public class ContactServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getContactSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentBundleServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentBundleServiceStubSettings.java index 564e0a14192e..0a56844afb40 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentBundleServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentBundleServiceStubSettings.java @@ -110,7 +110,10 @@ public class ContentBundleServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getContentBundleSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentLabelServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentLabelServiceStubSettings.java index 15cf68fe1391..ed10dcc48249 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentLabelServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentLabelServiceStubSettings.java @@ -109,7 +109,10 @@ public class ContentLabelServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getContentLabelSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentServiceStubSettings.java index f8a3928d6278..b17885f5edd7 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/ContentServiceStubSettings.java @@ -108,7 +108,10 @@ public class ContentServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getContentSettings; private final PagedCallSettings diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CreativeTemplateServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CreativeTemplateServiceStubSettings.java index 4578a9352cc2..958c03142202 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CreativeTemplateServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CreativeTemplateServiceStubSettings.java @@ -110,7 +110,10 @@ public class CreativeTemplateServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCreativeTemplateSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomFieldServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomFieldServiceStubSettings.java index 221c68d711e5..1fba62141b58 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomFieldServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomFieldServiceStubSettings.java @@ -119,7 +119,10 @@ public class CustomFieldServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCustomFieldSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingKeyServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingKeyServiceStubSettings.java index 7f30dd0733d3..0317ca4062cd 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingKeyServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingKeyServiceStubSettings.java @@ -120,7 +120,10 @@ public class CustomTargetingKeyServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCustomTargetingKeySettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingValueServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingValueServiceStubSettings.java index c9d986b95303..89fe8f7bd846 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingValueServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/CustomTargetingValueServiceStubSettings.java @@ -110,7 +110,10 @@ public class CustomTargetingValueServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getCustomTargetingValueSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCapabilityServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCapabilityServiceStubSettings.java index 1e440c684eb1..dcaf64714179 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCapabilityServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCapabilityServiceStubSettings.java @@ -110,7 +110,10 @@ public class DeviceCapabilityServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getDeviceCapabilitySettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCategoryServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCategoryServiceStubSettings.java index ba678d7260a3..5c02dd34f46d 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCategoryServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceCategoryServiceStubSettings.java @@ -110,7 +110,10 @@ public class DeviceCategoryServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getDeviceCategorySettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceManufacturerServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceManufacturerServiceStubSettings.java index c449281266d6..7ceae24fc4cf 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceManufacturerServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/DeviceManufacturerServiceStubSettings.java @@ -110,7 +110,10 @@ public class DeviceManufacturerServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getDeviceManufacturerSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/EntitySignalsMappingServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/EntitySignalsMappingServiceStubSettings.java index 624ebd5f8833..a14a6f4d14ba 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/EntitySignalsMappingServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/EntitySignalsMappingServiceStubSettings.java @@ -116,7 +116,10 @@ public class EntitySignalsMappingServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getEntitySignalsMappingSettings; diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/GeoTargetServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/GeoTargetServiceStubSettings.java index cf671c6436be..36421848395e 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/GeoTargetServiceStubSettings.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/GeoTargetServiceStubSettings.java @@ -108,7 +108,10 @@ public class GeoTargetServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/admanager").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); private final UnaryCallSettings getGeoTargetSettings; private final PagedCallSettings< diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonAdReviewCenterAdServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonAdReviewCenterAdServiceStub.java index 89f7e15024f3..702805767232 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonAdReviewCenterAdServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonAdReviewCenterAdServiceStub.java @@ -98,6 +98,8 @@ public class HttpJsonAdReviewCenterAdServiceStub extends AdReviewCenterAdService fields, "buyerAccountId", request.getBuyerAccountIdList()); serializer.putQueryParam( fields, "dateTimeRange", request.getDateTimeRange()); + serializer.putQueryParam( + fields, "manualReviewStatus", request.getManualReviewStatusValue()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam( @@ -265,6 +267,11 @@ protected HttpJsonAdReviewCenterAdServiceStub( callableFactory, typeRegistry, ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=networks/*/operations/reports/runs/*}:cancel") + .build()) .put( "google.longrunning.Operations.GetOperation", HttpRule.newBuilder() diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonApplicationServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonApplicationServiceStub.java index f3a12e005040..78c1dffae6f1 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonApplicationServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonApplicationServiceStub.java @@ -19,9 +19,19 @@ import static com.google.ads.admanager.v1.ApplicationServiceClient.ListApplicationsPagedResponse; import com.google.ads.admanager.v1.Application; +import com.google.ads.admanager.v1.BatchArchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchArchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchCreateApplicationsRequest; +import com.google.ads.admanager.v1.BatchCreateApplicationsResponse; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsRequest; +import com.google.ads.admanager.v1.BatchUnarchiveApplicationsResponse; +import com.google.ads.admanager.v1.BatchUpdateApplicationsRequest; +import com.google.ads.admanager.v1.BatchUpdateApplicationsResponse; +import com.google.ads.admanager.v1.CreateApplicationRequest; import com.google.ads.admanager.v1.GetApplicationRequest; import com.google.ads.admanager.v1.ListApplicationsRequest; import com.google.ads.admanager.v1.ListApplicationsResponse; +import com.google.ads.admanager.v1.UpdateApplicationRequest; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -126,11 +136,257 @@ public class HttpJsonApplicationServiceStub extends ApplicationServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + createApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.ApplicationService/CreateApplication") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/applications", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("application", request.getApplication(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Application.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchCreateApplicationsRequest, BatchCreateApplicationsResponse> + batchCreateApplicationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.ApplicationService/BatchCreateApplications") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/applications:batchCreate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchCreateApplicationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.ApplicationService/UpdateApplication") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{application.name=networks/*/applications/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "application.name", request.getApplication().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("application", request.getApplication(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Application.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchUpdateApplicationsRequest, BatchUpdateApplicationsResponse> + batchUpdateApplicationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.ApplicationService/BatchUpdateApplications") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/applications:batchUpdate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchUpdateApplicationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchArchiveApplicationsRequest, BatchArchiveApplicationsResponse> + batchArchiveApplicationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.ApplicationService/BatchArchiveApplications") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/applications:batchArchive", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchArchiveApplicationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchUnarchiveApplicationsRequest, BatchUnarchiveApplicationsResponse> + batchUnarchiveApplicationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.ApplicationService/BatchUnarchiveApplications") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/applications:batchUnarchive", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchUnarchiveApplicationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getApplicationCallable; private final UnaryCallable listApplicationsCallable; private final UnaryCallable listApplicationsPagedCallable; + private final UnaryCallable createApplicationCallable; + private final UnaryCallable + batchCreateApplicationsCallable; + private final UnaryCallable updateApplicationCallable; + private final UnaryCallable + batchUpdateApplicationsCallable; + private final UnaryCallable + batchArchiveApplicationsCallable; + private final UnaryCallable + batchUnarchiveApplicationsCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -199,6 +455,86 @@ protected HttpJsonApplicationServiceStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings createApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + batchCreateApplicationsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchCreateApplicationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "application.name", String.valueOf(request.getApplication().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + batchUpdateApplicationsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchUpdateApplicationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + batchArchiveApplicationsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchArchiveApplicationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + batchUnarchiveApplicationsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchUnarchiveApplicationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); this.getApplicationCallable = callableFactory.createUnaryCallable( @@ -209,6 +545,36 @@ protected HttpJsonApplicationServiceStub( this.listApplicationsPagedCallable = callableFactory.createPagedCallable( listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); + this.createApplicationCallable = + callableFactory.createUnaryCallable( + createApplicationTransportSettings, + settings.createApplicationSettings(), + clientContext); + this.batchCreateApplicationsCallable = + callableFactory.createUnaryCallable( + batchCreateApplicationsTransportSettings, + settings.batchCreateApplicationsSettings(), + clientContext); + this.updateApplicationCallable = + callableFactory.createUnaryCallable( + updateApplicationTransportSettings, + settings.updateApplicationSettings(), + clientContext); + this.batchUpdateApplicationsCallable = + callableFactory.createUnaryCallable( + batchUpdateApplicationsTransportSettings, + settings.batchUpdateApplicationsSettings(), + clientContext); + this.batchArchiveApplicationsCallable = + callableFactory.createUnaryCallable( + batchArchiveApplicationsTransportSettings, + settings.batchArchiveApplicationsSettings(), + clientContext); + this.batchUnarchiveApplicationsCallable = + callableFactory.createUnaryCallable( + batchUnarchiveApplicationsTransportSettings, + settings.batchUnarchiveApplicationsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -219,6 +585,12 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(getApplicationMethodDescriptor); methodDescriptors.add(listApplicationsMethodDescriptor); + methodDescriptors.add(createApplicationMethodDescriptor); + methodDescriptors.add(batchCreateApplicationsMethodDescriptor); + methodDescriptors.add(updateApplicationMethodDescriptor); + methodDescriptors.add(batchUpdateApplicationsMethodDescriptor); + methodDescriptors.add(batchArchiveApplicationsMethodDescriptor); + methodDescriptors.add(batchUnarchiveApplicationsMethodDescriptor); return methodDescriptors; } @@ -239,6 +611,40 @@ public UnaryCallable getApplicationCallable( return listApplicationsPagedCallable; } + @Override + public UnaryCallable createApplicationCallable() { + return createApplicationCallable; + } + + @Override + public UnaryCallable + batchCreateApplicationsCallable() { + return batchCreateApplicationsCallable; + } + + @Override + public UnaryCallable updateApplicationCallable() { + return updateApplicationCallable; + } + + @Override + public UnaryCallable + batchUpdateApplicationsCallable() { + return batchUpdateApplicationsCallable; + } + + @Override + public UnaryCallable + batchArchiveApplicationsCallable() { + return batchArchiveApplicationsCallable; + } + + @Override + public UnaryCallable + batchUnarchiveApplicationsCallable() { + return batchUnarchiveApplicationsCallable; + } + @Override public final void close() { try { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataKeyServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataKeyServiceStub.java index 88dac4aafcfb..64d1be677f7e 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataKeyServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataKeyServiceStub.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataKeyServiceClient.ListCmsMetadataKeysPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataKeysResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataKeysResponse; import com.google.ads.admanager.v1.CmsMetadataKey; import com.google.ads.admanager.v1.GetCmsMetadataKeyRequest; import com.google.ads.admanager.v1.ListCmsMetadataKeysRequest; @@ -127,11 +131,100 @@ public class HttpJsonCmsMetadataKeyServiceStub extends CmsMetadataKeyServiceStub .build()) .build(); + private static final ApiMethodDescriptor< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.CmsMetadataKeyService/BatchActivateCmsMetadataKeys") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/cmsMetadataKeys:batchActivate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchActivateCmsMetadataKeysResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.CmsMetadataKeyService/BatchDeactivateCmsMetadataKeys") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/cmsMetadataKeys:batchDeactivate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + BatchDeactivateCmsMetadataKeysResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getCmsMetadataKeyCallable; private final UnaryCallable listCmsMetadataKeysCallable; private final UnaryCallable listCmsMetadataKeysPagedCallable; + private final UnaryCallable< + BatchActivateCmsMetadataKeysRequest, BatchActivateCmsMetadataKeysResponse> + batchActivateCmsMetadataKeysCallable; + private final UnaryCallable< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -202,6 +295,37 @@ protected HttpJsonCmsMetadataKeyServiceStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings + batchActivateCmsMetadataKeysTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchActivateCmsMetadataKeysMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchDeactivateCmsMetadataKeysMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); this.getCmsMetadataKeyCallable = callableFactory.createUnaryCallable( @@ -218,6 +342,16 @@ protected HttpJsonCmsMetadataKeyServiceStub( listCmsMetadataKeysTransportSettings, settings.listCmsMetadataKeysSettings(), clientContext); + this.batchActivateCmsMetadataKeysCallable = + callableFactory.createUnaryCallable( + batchActivateCmsMetadataKeysTransportSettings, + settings.batchActivateCmsMetadataKeysSettings(), + clientContext); + this.batchDeactivateCmsMetadataKeysCallable = + callableFactory.createUnaryCallable( + batchDeactivateCmsMetadataKeysTransportSettings, + settings.batchDeactivateCmsMetadataKeysSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -228,6 +362,8 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(getCmsMetadataKeyMethodDescriptor); methodDescriptors.add(listCmsMetadataKeysMethodDescriptor); + methodDescriptors.add(batchActivateCmsMetadataKeysMethodDescriptor); + methodDescriptors.add(batchDeactivateCmsMetadataKeysMethodDescriptor); return methodDescriptors; } @@ -248,6 +384,19 @@ public UnaryCallable getCmsMetadataKey return listCmsMetadataKeysPagedCallable; } + @Override + public UnaryCallable + batchActivateCmsMetadataKeysCallable() { + return batchActivateCmsMetadataKeysCallable; + } + + @Override + public UnaryCallable< + BatchDeactivateCmsMetadataKeysRequest, BatchDeactivateCmsMetadataKeysResponse> + batchDeactivateCmsMetadataKeysCallable() { + return batchDeactivateCmsMetadataKeysCallable; + } + @Override public final void close() { try { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataValueServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataValueServiceStub.java index 3b1d1abb8a03..a811f554e8e5 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataValueServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonCmsMetadataValueServiceStub.java @@ -18,6 +18,10 @@ import static com.google.ads.admanager.v1.CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchActivateCmsMetadataValuesResponse; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesRequest; +import com.google.ads.admanager.v1.BatchDeactivateCmsMetadataValuesResponse; import com.google.ads.admanager.v1.CmsMetadataValue; import com.google.ads.admanager.v1.GetCmsMetadataValueRequest; import com.google.ads.admanager.v1.ListCmsMetadataValuesRequest; @@ -130,12 +134,102 @@ public class HttpJsonCmsMetadataValueServiceStub extends CmsMetadataValueService .build()) .build(); + private static final ApiMethodDescriptor< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.CmsMetadataValueService/BatchActivateCmsMetadataValues") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/cmsMetadataValues:batchActivate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + BatchActivateCmsMetadataValuesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.CmsMetadataValueService/BatchDeactivateCmsMetadataValues") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/cmsMetadataValues:batchDeactivate", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + BatchDeactivateCmsMetadataValuesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getCmsMetadataValueCallable; private final UnaryCallable listCmsMetadataValuesCallable; private final UnaryCallable listCmsMetadataValuesPagedCallable; + private final UnaryCallable< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesCallable; + private final UnaryCallable< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -207,6 +301,38 @@ protected HttpJsonCmsMetadataValueServiceStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchActivateCmsMetadataValuesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchDeactivateCmsMetadataValuesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); this.getCmsMetadataValueCallable = callableFactory.createUnaryCallable( @@ -223,6 +349,16 @@ protected HttpJsonCmsMetadataValueServiceStub( listCmsMetadataValuesTransportSettings, settings.listCmsMetadataValuesSettings(), clientContext); + this.batchActivateCmsMetadataValuesCallable = + callableFactory.createUnaryCallable( + batchActivateCmsMetadataValuesTransportSettings, + settings.batchActivateCmsMetadataValuesSettings(), + clientContext); + this.batchDeactivateCmsMetadataValuesCallable = + callableFactory.createUnaryCallable( + batchDeactivateCmsMetadataValuesTransportSettings, + settings.batchDeactivateCmsMetadataValuesSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -233,6 +369,8 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(getCmsMetadataValueMethodDescriptor); methodDescriptors.add(listCmsMetadataValuesMethodDescriptor); + methodDescriptors.add(batchActivateCmsMetadataValuesMethodDescriptor); + methodDescriptors.add(batchDeactivateCmsMetadataValuesMethodDescriptor); return methodDescriptors; } @@ -253,6 +391,20 @@ public UnaryCallable getCmsMetadat return listCmsMetadataValuesPagedCallable; } + @Override + public UnaryCallable< + BatchActivateCmsMetadataValuesRequest, BatchActivateCmsMetadataValuesResponse> + batchActivateCmsMetadataValuesCallable() { + return batchActivateCmsMetadataValuesCallable; + } + + @Override + public UnaryCallable< + BatchDeactivateCmsMetadataValuesRequest, BatchDeactivateCmsMetadataValuesResponse> + batchDeactivateCmsMetadataValuesCallable() { + return batchDeactivateCmsMetadataValuesCallable; + } + @Override public final void close() { try { diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceCallableFactory.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceCallableFactory.java new file mode 100644 index 000000000000..174150c949e8 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceCallableFactory.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.ads.admanager.v1.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 LabelService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLabelServiceCallableFactory + 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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceStub.java new file mode 100644 index 000000000000..08c6c25b1dcd --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLabelServiceStub.java @@ -0,0 +1,655 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.LabelServiceClient.ListLabelsPagedResponse; + +import com.google.ads.admanager.v1.BatchActivateLabelsRequest; +import com.google.ads.admanager.v1.BatchActivateLabelsResponse; +import com.google.ads.admanager.v1.BatchCreateLabelsRequest; +import com.google.ads.admanager.v1.BatchCreateLabelsResponse; +import com.google.ads.admanager.v1.BatchDeactivateLabelsRequest; +import com.google.ads.admanager.v1.BatchDeactivateLabelsResponse; +import com.google.ads.admanager.v1.BatchUpdateLabelsRequest; +import com.google.ads.admanager.v1.BatchUpdateLabelsResponse; +import com.google.ads.admanager.v1.CreateLabelRequest; +import com.google.ads.admanager.v1.GetLabelRequest; +import com.google.ads.admanager.v1.Label; +import com.google.ads.admanager.v1.ListLabelsRequest; +import com.google.ads.admanager.v1.ListLabelsResponse; +import com.google.ads.admanager.v1.UpdateLabelRequest; +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +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 LabelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLabelServiceStub extends LabelServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor getLabelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.LabelService/GetLabel") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=networks/*/labels/*}", + 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.

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLinkedDeviceServiceCallableFactory + 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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLinkedDeviceServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLinkedDeviceServiceStub.java new file mode 100644 index 000000000000..725c68f502f4 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonLinkedDeviceServiceStub.java @@ -0,0 +1,281 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.LinkedDeviceServiceClient.ListLinkedDevicesPagedResponse; + +import com.google.ads.admanager.v1.GetLinkedDeviceRequest; +import com.google.ads.admanager.v1.LinkedDevice; +import com.google.ads.admanager.v1.ListLinkedDevicesRequest; +import com.google.ads.admanager.v1.ListLinkedDevicesResponse; +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +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 LinkedDeviceService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLinkedDeviceServiceStub extends LinkedDeviceServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getLinkedDeviceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.LinkedDeviceService/GetLinkedDevice") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=networks/*/linkedDevices/*}", + 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(LinkedDevice.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLinkedDevicesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.LinkedDeviceService/ListLinkedDevices") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/linkedDevices", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "skip", request.getSkip()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLinkedDevicesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getLinkedDeviceCallable; + private final UnaryCallable + listLinkedDevicesCallable; + private final UnaryCallable + listLinkedDevicesPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonLinkedDeviceServiceStub create( + LinkedDeviceServiceStubSettings settings) throws IOException { + return new HttpJsonLinkedDeviceServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonLinkedDeviceServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonLinkedDeviceServiceStub( + LinkedDeviceServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonLinkedDeviceServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonLinkedDeviceServiceStub( + LinkedDeviceServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonLinkedDeviceServiceStub, 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 HttpJsonLinkedDeviceServiceStub( + LinkedDeviceServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonLinkedDeviceServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonLinkedDeviceServiceStub, 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 HttpJsonLinkedDeviceServiceStub( + LinkedDeviceServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getLinkedDeviceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLinkedDeviceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listLinkedDevicesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLinkedDevicesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.getLinkedDeviceCallable = + callableFactory.createUnaryCallable( + getLinkedDeviceTransportSettings, settings.getLinkedDeviceSettings(), clientContext); + this.listLinkedDevicesCallable = + callableFactory.createUnaryCallable( + listLinkedDevicesTransportSettings, + settings.listLinkedDevicesSettings(), + clientContext); + this.listLinkedDevicesPagedCallable = + callableFactory.createPagedCallable( + listLinkedDevicesTransportSettings, + settings.listLinkedDevicesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getLinkedDeviceMethodDescriptor); + methodDescriptors.add(listLinkedDevicesMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getLinkedDeviceCallable() { + return getLinkedDeviceCallable; + } + + @Override + public UnaryCallable + listLinkedDevicesCallable() { + return listLinkedDevicesCallable; + } + + @Override + public UnaryCallable + listLinkedDevicesPagedCallable() { + return listLinkedDevicesPagedCallable; + } + + @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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceCallableFactory.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceCallableFactory.java new file mode 100644 index 000000000000..24202555b587 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceCallableFactory.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.ads.admanager.v1.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 McmEarningsService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonMcmEarningsServiceCallableFactory + 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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceStub.java new file mode 100644 index 000000000000..4e652c808076 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonMcmEarningsServiceStub.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.McmEarningsServiceClient.FetchMcmEarningsPagedResponse; + +import com.google.ads.admanager.v1.FetchMcmEarningsRequest; +import com.google.ads.admanager.v1.FetchMcmEarningsResponse; +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +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 McmEarningsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonMcmEarningsServiceStub extends McmEarningsServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + fetchMcmEarningsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.admanager.v1.McmEarningsService/FetchMcmEarnings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/mcmEarnings:fetch", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "month", request.getMonth()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "skip", request.getSkip()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FetchMcmEarningsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + fetchMcmEarningsCallable; + private final UnaryCallable + fetchMcmEarningsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonMcmEarningsServiceStub create(McmEarningsServiceStubSettings settings) + throws IOException { + return new HttpJsonMcmEarningsServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonMcmEarningsServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonMcmEarningsServiceStub( + McmEarningsServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonMcmEarningsServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonMcmEarningsServiceStub( + McmEarningsServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonMcmEarningsServiceStub, 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 HttpJsonMcmEarningsServiceStub( + McmEarningsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonMcmEarningsServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonMcmEarningsServiceStub, 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 HttpJsonMcmEarningsServiceStub( + McmEarningsServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + fetchMcmEarningsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(fetchMcmEarningsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.fetchMcmEarningsCallable = + callableFactory.createUnaryCallable( + fetchMcmEarningsTransportSettings, settings.fetchMcmEarningsSettings(), clientContext); + this.fetchMcmEarningsPagedCallable = + callableFactory.createPagedCallable( + fetchMcmEarningsTransportSettings, settings.fetchMcmEarningsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(fetchMcmEarningsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + fetchMcmEarningsCallable() { + return fetchMcmEarningsCallable; + } + + @Override + public UnaryCallable + fetchMcmEarningsPagedCallable() { + return fetchMcmEarningsPagedCallable; + } + + @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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonReportServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonReportServiceStub.java index ba86fd802063..afdf8337b53c 100644 --- a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonReportServiceStub.java +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonReportServiceStub.java @@ -358,6 +358,11 @@ protected HttpJsonReportServiceStub( callableFactory, typeRegistry, ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=networks/*/operations/reports/runs/*}:cancel") + .build()) .put( "google.longrunning.Operations.GetOperation", HttpRule.newBuilder() diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceCallableFactory.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceCallableFactory.java new file mode 100644 index 000000000000..39af8625e100 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceCallableFactory.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.ads.admanager.v1.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 RichMediaAdsCompanyService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonRichMediaAdsCompanyServiceCallableFactory + 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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceStub.java new file mode 100644 index 000000000000..aca002757588 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/HttpJsonRichMediaAdsCompanyServiceStub.java @@ -0,0 +1,295 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.RichMediaAdsCompanyServiceClient.ListRichMediaAdsCompaniesPagedResponse; + +import com.google.ads.admanager.v1.GetRichMediaAdsCompanyRequest; +import com.google.ads.admanager.v1.ListRichMediaAdsCompaniesRequest; +import com.google.ads.admanager.v1.ListRichMediaAdsCompaniesResponse; +import com.google.ads.admanager.v1.RichMediaAdsCompany; +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +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 RichMediaAdsCompanyService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonRichMediaAdsCompanyServiceStub extends RichMediaAdsCompanyServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getRichMediaAdsCompanyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.RichMediaAdsCompanyService/GetRichMediaAdsCompany") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=networks/*/richMediaAdsCompanies/*}", + 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(RichMediaAdsCompany.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListRichMediaAdsCompaniesRequest, ListRichMediaAdsCompaniesResponse> + listRichMediaAdsCompaniesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.ads.admanager.v1.RichMediaAdsCompanyService/ListRichMediaAdsCompanies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=networks/*}/richMediaAdsCompanies", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "skip", request.getSkip()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRichMediaAdsCompaniesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + getRichMediaAdsCompanyCallable; + private final UnaryCallable + listRichMediaAdsCompaniesCallable; + private final UnaryCallable< + ListRichMediaAdsCompaniesRequest, ListRichMediaAdsCompaniesPagedResponse> + listRichMediaAdsCompaniesPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonRichMediaAdsCompanyServiceStub create( + RichMediaAdsCompanyServiceStubSettings settings) throws IOException { + return new HttpJsonRichMediaAdsCompanyServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonRichMediaAdsCompanyServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonRichMediaAdsCompanyServiceStub( + RichMediaAdsCompanyServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonRichMediaAdsCompanyServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonRichMediaAdsCompanyServiceStub( + RichMediaAdsCompanyServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonRichMediaAdsCompanyServiceStub, 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 HttpJsonRichMediaAdsCompanyServiceStub( + RichMediaAdsCompanyServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonRichMediaAdsCompanyServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonRichMediaAdsCompanyServiceStub, 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 HttpJsonRichMediaAdsCompanyServiceStub( + RichMediaAdsCompanyServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + getRichMediaAdsCompanyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRichMediaAdsCompanyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listRichMediaAdsCompaniesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listRichMediaAdsCompaniesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.getRichMediaAdsCompanyCallable = + callableFactory.createUnaryCallable( + getRichMediaAdsCompanyTransportSettings, + settings.getRichMediaAdsCompanySettings(), + clientContext); + this.listRichMediaAdsCompaniesCallable = + callableFactory.createUnaryCallable( + listRichMediaAdsCompaniesTransportSettings, + settings.listRichMediaAdsCompaniesSettings(), + clientContext); + this.listRichMediaAdsCompaniesPagedCallable = + callableFactory.createPagedCallable( + listRichMediaAdsCompaniesTransportSettings, + settings.listRichMediaAdsCompaniesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getRichMediaAdsCompanyMethodDescriptor); + methodDescriptors.add(listRichMediaAdsCompaniesMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + getRichMediaAdsCompanyCallable() { + return getRichMediaAdsCompanyCallable; + } + + @Override + public UnaryCallable + listRichMediaAdsCompaniesCallable() { + return listRichMediaAdsCompaniesCallable; + } + + @Override + public UnaryCallable + listRichMediaAdsCompaniesPagedCallable() { + return listRichMediaAdsCompaniesPagedCallable; + } + + @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-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStub.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStub.java new file mode 100644 index 000000000000..8b562f5d44a1 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStub.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. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.LabelServiceClient.ListLabelsPagedResponse; + +import com.google.ads.admanager.v1.BatchActivateLabelsRequest; +import com.google.ads.admanager.v1.BatchActivateLabelsResponse; +import com.google.ads.admanager.v1.BatchCreateLabelsRequest; +import com.google.ads.admanager.v1.BatchCreateLabelsResponse; +import com.google.ads.admanager.v1.BatchDeactivateLabelsRequest; +import com.google.ads.admanager.v1.BatchDeactivateLabelsResponse; +import com.google.ads.admanager.v1.BatchUpdateLabelsRequest; +import com.google.ads.admanager.v1.BatchUpdateLabelsResponse; +import com.google.ads.admanager.v1.CreateLabelRequest; +import com.google.ads.admanager.v1.GetLabelRequest; +import com.google.ads.admanager.v1.Label; +import com.google.ads.admanager.v1.ListLabelsRequest; +import com.google.ads.admanager.v1.ListLabelsResponse; +import com.google.ads.admanager.v1.UpdateLabelRequest; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LabelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class LabelServiceStub implements BackgroundResource { + + public UnaryCallable getLabelCallable() { + throw new UnsupportedOperationException("Not implemented: getLabelCallable()"); + } + + public UnaryCallable listLabelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLabelsPagedCallable()"); + } + + public UnaryCallable listLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: listLabelsCallable()"); + } + + public UnaryCallable createLabelCallable() { + throw new UnsupportedOperationException("Not implemented: createLabelCallable()"); + } + + public UnaryCallable + batchCreateLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateLabelsCallable()"); + } + + public UnaryCallable updateLabelCallable() { + throw new UnsupportedOperationException("Not implemented: updateLabelCallable()"); + } + + public UnaryCallable + batchUpdateLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateLabelsCallable()"); + } + + public UnaryCallable + batchActivateLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: batchActivateLabelsCallable()"); + } + + public UnaryCallable + batchDeactivateLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeactivateLabelsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStubSettings.java b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStubSettings.java new file mode 100644 index 000000000000..169d1d09ad79 --- /dev/null +++ b/java-admanager/ad-manager/src/main/java/com/google/ads/admanager/v1/stub/LabelServiceStubSettings.java @@ -0,0 +1,549 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ads.admanager.v1.stub; + +import static com.google.ads.admanager.v1.LabelServiceClient.ListLabelsPagedResponse; + +import com.google.ads.admanager.v1.BatchActivateLabelsRequest; +import com.google.ads.admanager.v1.BatchActivateLabelsResponse; +import com.google.ads.admanager.v1.BatchCreateLabelsRequest; +import com.google.ads.admanager.v1.BatchCreateLabelsResponse; +import com.google.ads.admanager.v1.BatchDeactivateLabelsRequest; +import com.google.ads.admanager.v1.BatchDeactivateLabelsResponse; +import com.google.ads.admanager.v1.BatchUpdateLabelsRequest; +import com.google.ads.admanager.v1.BatchUpdateLabelsResponse; +import com.google.ads.admanager.v1.CreateLabelRequest; +import com.google.ads.admanager.v1.GetLabelRequest; +import com.google.ads.admanager.v1.Label; +import com.google.ads.admanager.v1.ListLabelsRequest; +import com.google.ads.admanager.v1.ListLabelsResponse; +import com.google.ads.admanager.v1.UpdateLabelRequest; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link LabelServiceStub}. + * + *

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

    + *
  • The default service address (admanager.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 getLabel: + * + *

{@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
+ * LabelServiceStubSettings.Builder labelServiceSettingsBuilder =
+ *     LabelServiceStubSettings.newBuilder();
+ * labelServiceSettingsBuilder
+ *     .getLabelSettings()
+ *     .setRetrySettings(
+ *         labelServiceSettingsBuilder
+ *             .getLabelSettings()
+ *             .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());
+ * LabelServiceStubSettings labelServiceSettings = labelServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class LabelServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/admanager") + .add("https://www.googleapis.com/auth/admanager.readonly") + .build(); + + private final UnaryCallSettings getLabelSettings; + private final PagedCallSettings + listLabelsSettings; + private final UnaryCallSettings createLabelSettings; + private final UnaryCallSettings + batchCreateLabelsSettings; + private final UnaryCallSettings updateLabelSettings; + private final UnaryCallSettings + batchUpdateLabelsSettings; + private final UnaryCallSettings + batchActivateLabelsSettings; + private final UnaryCallSettings + batchDeactivateLabelsSettings; + + private static final PagedListDescriptor + LIST_LABELS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLabelsRequest injectToken(ListLabelsRequest payload, String token) { + return ListLabelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLabelsRequest injectPageSize(ListLabelsRequest payload, int pageSize) { + return ListLabelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLabelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLabelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable